From patchwork Sun Mar 24 21:09:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Frank Schaefer X-Patchwork-Id: 17597 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1UJsAG-0004zV-VD; Sun, 24 Mar 2013 22:09:17 +0100 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.75/mailfrontend-4) with esmtp id 1UJsAF-0006f7-BQ; Sun, 24 Mar 2013 22:09:16 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754762Ab3CXVJN (ORCPT + 1 other); Sun, 24 Mar 2013 17:09:13 -0400 Received: from mail-ea0-f179.google.com ([209.85.215.179]:62873 "EHLO mail-ea0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754511Ab3CXVJM (ORCPT ); Sun, 24 Mar 2013 17:09:12 -0400 Received: by mail-ea0-f179.google.com with SMTP id f15so2034203eak.10 for ; Sun, 24 Mar 2013 14:09:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:mime-version :content-type:content-transfer-encoding; bh=yGHTfPtMOdtjs/56AmZapMIBbSmqN3p7PjrCGBTMPpc=; b=lEpO0NujBgk1lfHdisoyBUrRa1oeNQsb8Ewzf722tQI4MKn5O1mFHgGiU8EQaxS+QO GhDj/1NbOgh/wNRwC316/Gg+v6pIPsQxtxDtLMjRvgPPFsoR+yn6f/w11WAMapLhbIIG khiyb+wM1urmg4lQlBBkLOVdHfpXD0DXZfM0rD2r9RDAAb+yGoa7b4WdSQgGegUF4mF4 0ZR1cP8MJA7cwff8OeMbirXGWssdqwE+NNKOkJgplKV9qzsa15CgCF1fSS/1GXUD07e6 minWDmQWfLuwx/H5ezBhUbVtq2L3JUZ5nTi+6PZ2GCiUSCEF6bv9XnS0T/c41nHBSmYd gPug== X-Received: by 10.14.194.198 with SMTP id m46mr27159456een.8.1364159351071; Sun, 24 Mar 2013 14:09:11 -0700 (PDT) Received: from Athlon64X2-5000.site (ip-178-202-185-88.unitymediagroup.de. [178.202.185.88]) by mx.google.com with ESMTPS id u44sm15377444eel.7.2013.03.24.14.09.09 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 24 Mar 2013 14:09:10 -0700 (PDT) From: =?UTF-8?q?Frank=20Sch=C3=A4fer?= To: mchehab@redhat.com Cc: linux-media@vger.kernel.org, =?UTF-8?q?Frank=20Sch=C3=A4fer?= Subject: [PATCH] em28xx-i2c: fix coding style of multi line comments Date: Sun, 24 Mar 2013 22:09:59 +0100 Message-Id: <1364159399-16730-1-git-send-email-fschaefer.oss@googlemail.com> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2013.3.24.210018 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODY_SIZE_5000_5999 0, BODY_SIZE_7000_LESS 0, CT_TEXT_PLAIN_UTF8_CAPS 0, DKIM_SIGNATURE 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __FRAUD_BODY_WEBMAIL 0, __FRAUD_WEBMAIL 0, __FRAUD_WEBMAIL_FROM 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MULTIPLE_RCPTS_CC_X2 0, __PHISH_SPEAR_STRUCTURE_1 0, __SANE_MSGID 0, __STOCK_PHRASE_7 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS , __YOUTUBE_RCVD 0' Signed-off-by: Frank Schäfer --- drivers/media/usb/em28xx/em28xx-i2c.c | 52 +++++++++++++++++++++------------ 1 Datei geändert, 34 Zeilen hinzugefügt(+), 18 Zeilen entfernt(-) diff --git a/drivers/media/usb/em28xx/em28xx-i2c.c b/drivers/media/usb/em28xx/em28xx-i2c.c index db40835..79ed1da 100644 --- a/drivers/media/usb/em28xx/em28xx-i2c.c +++ b/drivers/media/usb/em28xx/em28xx-i2c.c @@ -171,8 +171,10 @@ static int em28xx_i2c_send_bytes(struct em28xx *dev, u16 addr, u8 *buf, if (len < 1 || len > 64) return -EOPNOTSUPP; - /* NOTE: limited by the USB ctrl message constraints - * Zero length reads always succeed, even if no device is connected */ + /* + * NOTE: limited by the USB ctrl message constraints + * Zero length reads always succeed, even if no device is connected + */ /* Write to i2c device */ ret = dev->em28xx_write_regs_req(dev, stop ? 2 : 3, addr, buf, len); @@ -202,9 +204,11 @@ static int em28xx_i2c_send_bytes(struct em28xx *dev, u16 addr, u8 *buf, return ret; } msleep(5); - /* NOTE: do we really have to wait for success ? - Never seen anything else than 0x00 or 0x10 - (even with high payload) ... */ + /* + * NOTE: do we really have to wait for success ? + * Never seen anything else than 0x00 or 0x10 + * (even with high payload) ... + */ } em28xx_warn("write to i2c device at 0x%x timed out\n", addr); return -EIO; @@ -220,8 +224,10 @@ static int em28xx_i2c_recv_bytes(struct em28xx *dev, u16 addr, u8 *buf, u16 len) if (len < 1 || len > 64) return -EOPNOTSUPP; - /* NOTE: limited by the USB ctrl message constraints - * Zero length reads always succeed, even if no device is connected */ + /* + * NOTE: limited by the USB ctrl message constraints + * Zero length reads always succeed, even if no device is connected + */ /* Read data from i2c device */ ret = dev->em28xx_read_reg_req_len(dev, 2, addr, buf, len); @@ -230,7 +236,8 @@ static int em28xx_i2c_recv_bytes(struct em28xx *dev, u16 addr, u8 *buf, u16 len) addr, ret); return ret; } - /* NOTE: some devices with two i2c busses have the bad habit to return 0 + /* + * NOTE: some devices with two i2c busses have the bad habit to return 0 * bytes if we are on bus B AND there was no write attempt to the * specified slave address before AND no device is present at the * requested slave address. @@ -366,9 +373,10 @@ static int em28xx_i2c_xfer(struct i2c_adapter *i2c_adap, return num; } -/* based on linux/sunrpc/svcauth.h and linux/hash.h +/* + * based on linux/sunrpc/svcauth.h and linux/hash.h * The original hash function returns a different value, if arch is x86_64 - * or i386. + * or i386. */ static inline unsigned long em28xx_hash_mem(char *buf, int length, int bits) { @@ -391,8 +399,10 @@ static inline unsigned long em28xx_hash_mem(char *buf, int length, int bits) return (hash >> (32 - bits)) & 0xffffffffUL; } -/* Helper function to read data blocks from i2c clients with 8 or 16 bit - * address width, 8 bit register width and auto incrementation been activated */ +/* + * Helper function to read data blocks from i2c clients with 8 or 16 bit + * address width, 8 bit register width and auto incrementation been activated + */ static int em28xx_i2c_read_block(struct em28xx *dev, unsigned bus, u16 addr, bool addr_w16, u16 len, u8 *data) { @@ -434,9 +444,11 @@ static int em28xx_i2c_eeprom(struct em28xx *dev, unsigned bus, u8 **eedata, u16 *eedata_len) { const u16 len = 256; - /* FIXME common length/size for bytes to read, to display, hash + /* + * FIXME common length/size for bytes to read, to display, hash * calculation and returned device dataset. Simplifies the code a lot, - * but we might have to deal with multiple sizes in the future ! */ + * but we might have to deal with multiple sizes in the future ! + */ int i, err; struct em28xx_eeprom *dev_config; u8 buf, *data; @@ -497,7 +509,8 @@ static int em28xx_i2c_eeprom(struct em28xx *dev, unsigned bus, em28xx_info("EEPROM info:\n"); em28xx_info("\tmicrocode start address = 0x%04x, boot configuration = 0x%02x\n", mc_start, data[2]); - /* boot configuration (address 0x0002): + /* + * boot configuration (address 0x0002): * [0] microcode download speed: 1 = 400 kHz; 0 = 100 kHz * [1] always selects 12 kb RAM * [2] USB device speed: 1 = force Full Speed; 0 = auto detect @@ -506,8 +519,10 @@ static int em28xx_i2c_eeprom(struct em28xx *dev, unsigned bus, * characterization */ - /* Read hardware config dataset offset from address - * (microcode start + 46) */ + /* + * Read hardware config dataset offset from address + * (microcode start + 46) + */ err = em28xx_i2c_read_block(dev, bus, mc_start + 46, 1, 2, data); if (err != 2) { @@ -520,7 +535,8 @@ static int em28xx_i2c_eeprom(struct em28xx *dev, unsigned bus, hwconf_offset = mc_start + data[0] + (data[1] << 8); /* Read hardware config dataset */ - /* NOTE: the microcode copy can be multiple pages long, but + /* + * NOTE: the microcode copy can be multiple pages long, but * we assume the hardware config dataset is the same as in * the old eeprom and not longer than 256 bytes. * tveeprom is currently also limited to 256 bytes.