From patchwork Sun Mar 24 18:58:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Frank Schaefer X-Patchwork-Id: 17596 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1UJq6Z-0006CG-Ie; Sun, 24 Mar 2013 19:57:19 +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-3) with esmtp id 1UJq6Y-0001eJ-Ez; Sun, 24 Mar 2013 19:57:19 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754141Ab3CXS5Q (ORCPT + 1 other); Sun, 24 Mar 2013 14:57:16 -0400 Received: from mail-ee0-f46.google.com ([74.125.83.46]:54480 "EHLO mail-ee0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753976Ab3CXS5Q (ORCPT ); Sun, 24 Mar 2013 14:57:16 -0400 Received: by mail-ee0-f46.google.com with SMTP id e49so2870252eek.19 for ; Sun, 24 Mar 2013 11:57:14 -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=HGFlJR2U15xEPaKjxXjjwSnrBNDKQzmQlP1VbRAPl6k=; b=vjjG06xtbk/XOj/8k5yVAQ0ibz5UDOENvW8trnSl1q/azrNXsRIypKVdkis/s36UXX XSFLtg1QAPl4D6pVxzyqvf8yXEDrUsHmrSbhNrZOSU/henH+6LDfXA435LiDxZutnMBE 4uwLq2bYJtByumT+L6BHyhDRkrU/+ohOpBH4SCfOlvuwCLjDaIv2qJYDuJZnOcn5RGX0 h3POcv1H96rd9nvEfA2Q5+m0vw44uB+jRK6A0GzDrG+4cO23Ed13NC7WOa71mP6Vn6jC GV6BSppyS3PvQxiDOMc5vajeEnxp6d8DbV1qNPop7W8DCeo3NyrZt1Xg1aGKypfvTbjT y7wQ== X-Received: by 10.15.43.132 with SMTP id x4mr26320111eev.31.1364151434572; Sun, 24 Mar 2013 11:57:14 -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 3sm14816020eej.6.2013.03.24.11.57.13 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 24 Mar 2013 11:57:13 -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: do not break strings across lines Date: Sun, 24 Mar 2013 19:58:03 +0100 Message-Id: <1364151483-14379-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.184517 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 | 45 +++++++++++++++------------------ 1 Datei geändert, 20 Zeilen hinzugefügt(+), 25 Zeilen entfernt(-) diff --git a/drivers/media/usb/em28xx/em28xx-i2c.c b/drivers/media/usb/em28xx/em28xx-i2c.c index 9e2fa41..db40835 100644 --- a/drivers/media/usb/em28xx/em28xx-i2c.c +++ b/drivers/media/usb/em28xx/em28xx-i2c.c @@ -68,8 +68,8 @@ static int em2800_i2c_send_bytes(struct em28xx *dev, u8 addr, u8 *buf, u16 len) /* trigger write */ ret = dev->em28xx_write_regs(dev, 4 - len, &b2[4 - len], 2 + len); if (ret != 2 + len) { - em28xx_warn("failed to trigger write to i2c address 0x%x " - "(error=%i)\n", addr, ret); + em28xx_warn("failed to trigger write to i2c address 0x%x (error=%i)\n", + addr, ret); return (ret < 0) ? ret : -EIO; } /* wait for completion */ @@ -81,8 +81,8 @@ static int em2800_i2c_send_bytes(struct em28xx *dev, u8 addr, u8 *buf, u16 len) } else if (ret == 0x94 + len - 1) { return -ENODEV; } else if (ret < 0) { - em28xx_warn("failed to get i2c transfer status from " - "bridge register (error=%i)\n", ret); + em28xx_warn("failed to get i2c transfer status from bridge register (error=%i)\n", + ret); return ret; } msleep(5); @@ -110,8 +110,8 @@ static int em2800_i2c_recv_bytes(struct em28xx *dev, u8 addr, u8 *buf, u16 len) buf2[0] = addr; ret = dev->em28xx_write_regs(dev, 0x04, buf2, 2); if (ret != 2) { - em28xx_warn("failed to trigger read from i2c address 0x%x " - "(error=%i)\n", addr, ret); + em28xx_warn("failed to trigger read from i2c address 0x%x (error=%i)\n", + addr, ret); return (ret < 0) ? ret : -EIO; } @@ -124,8 +124,8 @@ static int em2800_i2c_recv_bytes(struct em28xx *dev, u8 addr, u8 *buf, u16 len) } else if (ret == 0x94 + len - 1) { return -ENODEV; } else if (ret < 0) { - em28xx_warn("failed to get i2c transfer status from " - "bridge register (error=%i)\n", ret); + em28xx_warn("failed to get i2c transfer status from bridge register (error=%i)\n", + ret); return ret; } msleep(5); @@ -136,9 +136,8 @@ static int em2800_i2c_recv_bytes(struct em28xx *dev, u8 addr, u8 *buf, u16 len) /* get the received message */ ret = dev->em28xx_read_reg_req_len(dev, 0x00, 4-len, buf2, len); if (ret != len) { - em28xx_warn("reading from i2c device at 0x%x failed: " - "couldn't get the received message from the bridge " - "(error=%i)\n", addr, ret); + em28xx_warn("reading from i2c device at 0x%x failed: couldn't get the received message from the bridge (error=%i)\n", + addr, ret); return (ret < 0) ? ret : -EIO; } for (i = 0; i < len; i++) @@ -179,12 +178,11 @@ static int em28xx_i2c_send_bytes(struct em28xx *dev, u16 addr, u8 *buf, ret = dev->em28xx_write_regs_req(dev, stop ? 2 : 3, addr, buf, len); if (ret != len) { if (ret < 0) { - em28xx_warn("writing to i2c device at 0x%x failed " - "(error=%i)\n", addr, ret); + em28xx_warn("writing to i2c device at 0x%x failed (error=%i)\n", + addr, ret); return ret; } else { - em28xx_warn("%i bytes write to i2c device at 0x%x " - "requested, but %i bytes written\n", + em28xx_warn("%i bytes write to i2c device at 0x%x requested, but %i bytes written\n", len, addr, ret); return -EIO; } @@ -199,8 +197,8 @@ static int em28xx_i2c_send_bytes(struct em28xx *dev, u16 addr, u8 *buf, } else if (ret == 0x10) { return -ENODEV; } else if (ret < 0) { - em28xx_warn("failed to read i2c transfer status from " - "bridge (error=%i)\n", ret); + em28xx_warn("failed to read i2c transfer status from bridge (error=%i)\n", + ret); return ret; } msleep(5); @@ -243,8 +241,8 @@ static int em28xx_i2c_recv_bytes(struct em28xx *dev, u16 addr, u8 *buf, u16 len) /* Check success of the i2c operation */ ret = dev->em28xx_read_reg(dev, 0x05); if (ret < 0) { - em28xx_warn("failed to read i2c transfer status from " - "bridge (error=%i)\n", ret); + em28xx_warn("failed to read i2c transfer status from bridge (error=%i)\n", + ret); return ret; } if (ret > 0) { @@ -494,12 +492,10 @@ static int em28xx_i2c_eeprom(struct em28xx *dev, unsigned bus, dev->hash = em28xx_hash_mem(data, len, 32); mc_start = (data[1] << 8) + 4; /* usually 0x0004 */ - em28xx_info("EEPROM ID = %02x %02x %02x %02x, " - "EEPROM hash = 0x%08lx\n", + em28xx_info("EEPROM ID = %02x %02x %02x %02x, EEPROM hash = 0x%08lx\n", data[0], data[1], data[2], data[3], dev->hash); em28xx_info("EEPROM info:\n"); - em28xx_info("\tmicrocode start address = 0x%04x, " - "boot configuration = 0x%02x\n", + em28xx_info("\tmicrocode start address = 0x%04x, boot configuration = 0x%02x\n", mc_start, data[2]); /* boot configuration (address 0x0002): * [0] microcode download speed: 1 = 400 kHz; 0 = 100 kHz @@ -552,8 +548,7 @@ static int em28xx_i2c_eeprom(struct em28xx *dev, unsigned bus, data[0] == 0x1a && data[1] == 0xeb && data[2] == 0x67 && data[3] == 0x95) { dev->hash = em28xx_hash_mem(data, len, 32); - em28xx_info("EEPROM ID = %02x %02x %02x %02x, " - "EEPROM hash = 0x%08lx\n", + em28xx_info("EEPROM ID = %02x %02x %02x %02x, EEPROM hash = 0x%08lx\n", data[0], data[1], data[2], data[3], dev->hash); em28xx_info("EEPROM info:\n"); } else {