Commit b93d3d37 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Wolfram Sang

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: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent d1ed7985
...@@ -930,7 +930,7 @@ static int i2c_device_probe(struct device *dev) ...@@ -930,7 +930,7 @@ static int i2c_device_probe(struct device *dev)
status = 0; status = 0;
if (status) if (status)
dev_warn(&client->dev, "failed to set up wakeup irq"); dev_warn(&client->dev, "failed to set up wakeup irq\n");
} }
dev_dbg(dev, "probe\n"); dev_dbg(dev, "probe\n");
...@@ -1285,8 +1285,9 @@ i2c_new_device(struct i2c_adapter *adap, struct i2c_board_info const *info) ...@@ -1285,8 +1285,9 @@ i2c_new_device(struct i2c_adapter *adap, struct i2c_board_info const *info)
return client; return client;
out_err: out_err:
dev_err(&adap->dev, "Failed to register i2c client %s at 0x%02x " dev_err(&adap->dev,
"(%d)\n", client->name, client->addr, status); "Failed to register i2c client %s at 0x%02x (%d)\n",
client->name, client->addr, status);
out_err_silent: out_err_silent:
kfree(client); kfree(client);
return NULL; return NULL;
...@@ -1755,8 +1756,8 @@ static int i2c_do_add_adapter(struct i2c_driver *driver, ...@@ -1755,8 +1756,8 @@ static int i2c_do_add_adapter(struct i2c_driver *driver,
if (driver->attach_adapter) { if (driver->attach_adapter) {
dev_warn(&adap->dev, "%s: attach_adapter method is deprecated\n", dev_warn(&adap->dev, "%s: attach_adapter method is deprecated\n",
driver->driver.name); driver->driver.name);
dev_warn(&adap->dev, "Please use another way to instantiate " dev_warn(&adap->dev,
"your i2c_client\n"); "Please use another way to instantiate your i2c_client\n");
/* We ignore the return code; if it fails, too bad */ /* We ignore the return code; if it fails, too bad */
driver->attach_adapter(adap); driver->attach_adapter(adap);
} }
...@@ -2531,9 +2532,10 @@ int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) ...@@ -2531,9 +2532,10 @@ int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
if (adap->algo->master_xfer) { if (adap->algo->master_xfer) {
#ifdef DEBUG #ifdef DEBUG
for (ret = 0; ret < num; ret++) { for (ret = 0; ret < num; ret++) {
dev_dbg(&adap->dev, "master_xfer[%d] %c, addr=0x%02x, " dev_dbg(&adap->dev,
"len=%d%s\n", ret, (msgs[ret].flags & I2C_M_RD) "master_xfer[%d] %c, addr=0x%02x, len=%d%s\n",
? 'R' : 'W', msgs[ret].addr, msgs[ret].len, ret, (msgs[ret].flags & I2C_M_RD) ? 'R' : 'W',
msgs[ret].addr, msgs[ret].len,
(msgs[ret].flags & I2C_M_RECV_LEN) ? "+" : ""); (msgs[ret].flags & I2C_M_RECV_LEN) ? "+" : "");
} }
#endif #endif
...@@ -2699,9 +2701,9 @@ static int i2c_detect_address(struct i2c_client *temp_client, ...@@ -2699,9 +2701,9 @@ static int i2c_detect_address(struct i2c_client *temp_client,
/* Consistency check */ /* Consistency check */
if (info.type[0] == '\0') { if (info.type[0] == '\0') {
dev_err(&adapter->dev, "%s detection function provided " dev_err(&adapter->dev,
"no name for 0x%x\n", driver->driver.name, "%s detection function provided no name for 0x%x\n",
addr); driver->driver.name, addr);
} else { } else {
struct i2c_client *client; struct i2c_client *client;
...@@ -2739,9 +2741,8 @@ static int i2c_detect(struct i2c_adapter *adapter, struct i2c_driver *driver) ...@@ -2739,9 +2741,8 @@ static int i2c_detect(struct i2c_adapter *adapter, struct i2c_driver *driver)
/* Warn that the adapter lost class based instantiation */ /* Warn that the adapter lost class based instantiation */
if (adapter->class == I2C_CLASS_DEPRECATED) { if (adapter->class == I2C_CLASS_DEPRECATED) {
dev_dbg(&adapter->dev, dev_dbg(&adapter->dev,
"This adapter dropped support for I2C classes and " "This adapter dropped support for I2C classes and won't auto-detect %s devices anymore. "
"won't auto-detect %s devices anymore. If you need it, check " "If you need it, check 'Documentation/i2c/instantiating-devices' for alternatives.\n",
"'Documentation/i2c/instantiating-devices' for alternatives.\n",
driver->driver.name); driver->driver.name);
return 0; return 0;
} }
...@@ -2757,8 +2758,9 @@ static int i2c_detect(struct i2c_adapter *adapter, struct i2c_driver *driver) ...@@ -2757,8 +2758,9 @@ static int i2c_detect(struct i2c_adapter *adapter, struct i2c_driver *driver)
temp_client->adapter = adapter; temp_client->adapter = adapter;
for (i = 0; address_list[i] != I2C_CLIENT_END; i += 1) { for (i = 0; address_list[i] != I2C_CLIENT_END; i += 1) {
dev_dbg(&adapter->dev, "found normal entry for adapter %d, " dev_dbg(&adapter->dev,
"addr 0x%02x\n", adap_id, address_list[i]); "found normal entry for adapter %d, addr 0x%02x\n",
adap_id, address_list[i]);
temp_client->addr = address_list[i]; temp_client->addr = address_list[i];
err = i2c_detect_address(temp_client, driver); err = i2c_detect_address(temp_client, driver);
if (unlikely(err)) if (unlikely(err))
...@@ -2790,15 +2792,16 @@ i2c_new_probed_device(struct i2c_adapter *adap, ...@@ -2790,15 +2792,16 @@ i2c_new_probed_device(struct i2c_adapter *adap,
for (i = 0; addr_list[i] != I2C_CLIENT_END; i++) { for (i = 0; addr_list[i] != I2C_CLIENT_END; i++) {
/* Check address validity */ /* Check address validity */
if (i2c_check_7bit_addr_validity_strict(addr_list[i]) < 0) { if (i2c_check_7bit_addr_validity_strict(addr_list[i]) < 0) {
dev_warn(&adap->dev, "Invalid 7-bit address " dev_warn(&adap->dev, "Invalid 7-bit address 0x%02x\n",
"0x%02x\n", addr_list[i]); addr_list[i]);
continue; continue;
} }
/* Check address availability (7 bit, no need to encode flags) */ /* Check address availability (7 bit, no need to encode flags) */
if (i2c_check_addr_busy(adap, addr_list[i])) { if (i2c_check_addr_busy(adap, addr_list[i])) {
dev_dbg(&adap->dev, "Address 0x%02x already in " dev_dbg(&adap->dev,
"use, not probing\n", addr_list[i]); "Address 0x%02x already in use, not probing\n",
addr_list[i]);
continue; continue;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment