aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2016-08-25 10:42:10 -0400
committerWolfram Sang <wsa@the-dreams.de>2016-08-30 17:02:45 -0400
commitb93d3d3739246705dfcebce815b319542cd7fbfb (patch)
tree3843bf44ffc93497592b89a841449c2afa8ab2db
parentd1ed7985b9a6b85ea38a330108c51ec83381c01b (diff)
i2c: core: put literals on one line in dev_*() calls
It's better to have strings in the code like they appeared in the output. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-rw-r--r--drivers/i2c/i2c-core.c43
1 files changed, 23 insertions, 20 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index 0722713e5910..65242666901e 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -930,7 +930,7 @@ static int i2c_device_probe(struct device *dev)
930 status = 0; 930 status = 0;
931 931
932 if (status) 932 if (status)
933 dev_warn(&client->dev, "failed to set up wakeup irq"); 933 dev_warn(&client->dev, "failed to set up wakeup irq\n");
934 } 934 }
935 935
936 dev_dbg(dev, "probe\n"); 936 dev_dbg(dev, "probe\n");
@@ -1285,8 +1285,9 @@ i2c_new_device(struct i2c_adapter *adap, struct i2c_board_info const *info)
1285 return client; 1285 return client;
1286 1286
1287out_err: 1287out_err:
1288 dev_err(&adap->dev, "Failed to register i2c client %s at 0x%02x " 1288 dev_err(&adap->dev,
1289 "(%d)\n", client->name, client->addr, status); 1289 "Failed to register i2c client %s at 0x%02x (%d)\n",
1290 client->name, client->addr, status);
1290out_err_silent: 1291out_err_silent:
1291 kfree(client); 1292 kfree(client);
1292 return NULL; 1293 return NULL;
@@ -1755,8 +1756,8 @@ static int i2c_do_add_adapter(struct i2c_driver *driver,
1755 if (driver->attach_adapter) { 1756 if (driver->attach_adapter) {
1756 dev_warn(&adap->dev, "%s: attach_adapter method is deprecated\n", 1757 dev_warn(&adap->dev, "%s: attach_adapter method is deprecated\n",
1757 driver->driver.name); 1758 driver->driver.name);
1758 dev_warn(&adap->dev, "Please use another way to instantiate " 1759 dev_warn(&adap->dev,
1759 "your i2c_client\n"); 1760 "Please use another way to instantiate your i2c_client\n");
1760 /* We ignore the return code; if it fails, too bad */ 1761 /* We ignore the return code; if it fails, too bad */
1761 driver->attach_adapter(adap); 1762 driver->attach_adapter(adap);
1762 } 1763 }
@@ -2531,9 +2532,10 @@ int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
2531 if (adap->algo->master_xfer) { 2532 if (adap->algo->master_xfer) {
2532#ifdef DEBUG 2533#ifdef DEBUG
2533 for (ret = 0; ret < num; ret++) { 2534 for (ret = 0; ret < num; ret++) {
2534 dev_dbg(&adap->dev, "master_xfer[%d] %c, addr=0x%02x, " 2535 dev_dbg(&adap->dev,
2535 "len=%d%s\n", ret, (msgs[ret].flags & I2C_M_RD) 2536 "master_xfer[%d] %c, addr=0x%02x, len=%d%s\n",
2536 ? 'R' : 'W', msgs[ret].addr, msgs[ret].len, 2537 ret, (msgs[ret].flags & I2C_M_RD) ? 'R' : 'W',
2538 msgs[ret].addr, msgs[ret].len,
2537 (msgs[ret].flags & I2C_M_RECV_LEN) ? "+" : ""); 2539 (msgs[ret].flags & I2C_M_RECV_LEN) ? "+" : "");
2538 } 2540 }
2539#endif 2541#endif
@@ -2699,9 +2701,9 @@ static int i2c_detect_address(struct i2c_client *temp_client,
2699 2701
2700 /* Consistency check */ 2702 /* Consistency check */
2701 if (info.type[0] == '\0') { 2703 if (info.type[0] == '\0') {
2702 dev_err(&adapter->dev, "%s detection function provided " 2704 dev_err(&adapter->dev,
2703 "no name for 0x%x\n", driver->driver.name, 2705 "%s detection function provided no name for 0x%x\n",
2704 addr); 2706 driver->driver.name, addr);
2705 } else { 2707 } else {
2706 struct i2c_client *client; 2708 struct i2c_client *client;
2707 2709
@@ -2739,9 +2741,8 @@ static int i2c_detect(struct i2c_adapter *adapter, struct i2c_driver *driver)
2739 /* Warn that the adapter lost class based instantiation */ 2741 /* Warn that the adapter lost class based instantiation */
2740 if (adapter->class == I2C_CLASS_DEPRECATED) { 2742 if (adapter->class == I2C_CLASS_DEPRECATED) {
2741 dev_dbg(&adapter->dev, 2743 dev_dbg(&adapter->dev,
2742 "This adapter dropped support for I2C classes and " 2744 "This adapter dropped support for I2C classes and won't auto-detect %s devices anymore. "
2743 "won't auto-detect %s devices anymore. If you need it, check " 2745 "If you need it, check 'Documentation/i2c/instantiating-devices' for alternatives.\n",
2744 "'Documentation/i2c/instantiating-devices' for alternatives.\n",
2745 driver->driver.name); 2746 driver->driver.name);
2746 return 0; 2747 return 0;
2747 } 2748 }
@@ -2757,8 +2758,9 @@ static int i2c_detect(struct i2c_adapter *adapter, struct i2c_driver *driver)
2757 temp_client->adapter = adapter; 2758 temp_client->adapter = adapter;
2758 2759
2759 for (i = 0; address_list[i] != I2C_CLIENT_END; i += 1) { 2760 for (i = 0; address_list[i] != I2C_CLIENT_END; i += 1) {
2760 dev_dbg(&adapter->dev, "found normal entry for adapter %d, " 2761 dev_dbg(&adapter->dev,
2761 "addr 0x%02x\n", adap_id, address_list[i]); 2762 "found normal entry for adapter %d, addr 0x%02x\n",
2763 adap_id, address_list[i]);
2762 temp_client->addr = address_list[i]; 2764 temp_client->addr = address_list[i];
2763 err = i2c_detect_address(temp_client, driver); 2765 err = i2c_detect_address(temp_client, driver);
2764 if (unlikely(err)) 2766 if (unlikely(err))
@@ -2790,15 +2792,16 @@ i2c_new_probed_device(struct i2c_adapter *adap,
2790 for (i = 0; addr_list[i] != I2C_CLIENT_END; i++) { 2792 for (i = 0; addr_list[i] != I2C_CLIENT_END; i++) {
2791 /* Check address validity */ 2793 /* Check address validity */
2792 if (i2c_check_7bit_addr_validity_strict(addr_list[i]) < 0) { 2794 if (i2c_check_7bit_addr_validity_strict(addr_list[i]) < 0) {
2793 dev_warn(&adap->dev, "Invalid 7-bit address " 2795 dev_warn(&adap->dev, "Invalid 7-bit address 0x%02x\n",
2794 "0x%02x\n", addr_list[i]); 2796 addr_list[i]);
2795 continue; 2797 continue;
2796 } 2798 }
2797 2799
2798 /* Check address availability (7 bit, no need to encode flags) */ 2800 /* Check address availability (7 bit, no need to encode flags) */
2799 if (i2c_check_addr_busy(adap, addr_list[i])) { 2801 if (i2c_check_addr_busy(adap, addr_list[i])) {
2800 dev_dbg(&adap->dev, "Address 0x%02x already in " 2802 dev_dbg(&adap->dev,
2801 "use, not probing\n", addr_list[i]); 2803 "Address 0x%02x already in use, not probing\n",
2804 addr_list[i]);
2802 continue; 2805 continue;
2803 } 2806 }
2804 2807