Commit 2ecd4240 authored by Luis de Bethencourt's avatar Luis de Bethencourt Committed by Mauro Carvalho Chehab

[media] staging: media: lirc: lirc_zilog.c: keep consistency in dev functions

The previous patch switched some dev functions to move the string to a second
line. Doing this for all similar functions because it makes the driver easier
to read if all similar lines use the same criteria.
Signed-off-by: default avatarLuis de Bethencourt <luis@debethencourt.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 221ca912
...@@ -369,7 +369,7 @@ static int add_to_buf(struct IR *ir) ...@@ -369,7 +369,7 @@ static int add_to_buf(struct IR *ir)
ret = i2c_master_send(rx->c, sendbuf, 1); ret = i2c_master_send(rx->c, sendbuf, 1);
if (ret != 1) { if (ret != 1) {
dev_err(ir->l.dev, "i2c_master_send failed with %d\n", dev_err(ir->l.dev, "i2c_master_send failed with %d\n",
ret); ret);
if (failures >= 3) { if (failures >= 3) {
mutex_unlock(&ir->ir_lock); mutex_unlock(&ir->ir_lock);
dev_err(ir->l.dev, dev_err(ir->l.dev,
...@@ -412,8 +412,9 @@ static int add_to_buf(struct IR *ir) ...@@ -412,8 +412,9 @@ static int add_to_buf(struct IR *ir)
rx->b[0] = keybuf[3]; rx->b[0] = keybuf[3];
rx->b[1] = keybuf[4]; rx->b[1] = keybuf[4];
rx->b[2] = keybuf[5]; rx->b[2] = keybuf[5];
dev_dbg(ir->l.dev, "key (0x%02x/0x%02x)\n", dev_dbg(ir->l.dev,
rx->b[0], rx->b[1]); "key (0x%02x/0x%02x)\n",
rx->b[0], rx->b[1]);
} }
/* key pressed ? */ /* key pressed ? */
...@@ -657,8 +658,8 @@ static int send_data_block(struct IR_tx *tx, unsigned char *data_block) ...@@ -657,8 +658,8 @@ static int send_data_block(struct IR_tx *tx, unsigned char *data_block)
dev_dbg(tx->ir->l.dev, "%*ph", 5, buf); dev_dbg(tx->ir->l.dev, "%*ph", 5, buf);
ret = i2c_master_send(tx->c, buf, tosend + 1); ret = i2c_master_send(tx->c, buf, tosend + 1);
if (ret != tosend + 1) { if (ret != tosend + 1) {
dev_err(tx->ir->l.dev, "i2c_master_send failed with %d\n", dev_err(tx->ir->l.dev,
ret); "i2c_master_send failed with %d\n", ret);
return ret < 0 ? ret : -EFAULT; return ret < 0 ? ret : -EFAULT;
} }
i += tosend; i += tosend;
...@@ -711,7 +712,7 @@ static int send_boot_data(struct IR_tx *tx) ...@@ -711,7 +712,7 @@ static int send_boot_data(struct IR_tx *tx)
} }
if ((buf[0] != 0x80) && (buf[0] != 0xa0)) { if ((buf[0] != 0x80) && (buf[0] != 0xa0)) {
dev_err(tx->ir->l.dev, "unexpected IR TX init response: %02x\n", dev_err(tx->ir->l.dev, "unexpected IR TX init response: %02x\n",
buf[0]); buf[0]);
return 0; return 0;
} }
dev_notice(tx->ir->l.dev, dev_notice(tx->ir->l.dev,
...@@ -761,8 +762,9 @@ static int fw_load(struct IR_tx *tx) ...@@ -761,8 +762,9 @@ static int fw_load(struct IR_tx *tx)
/* Request codeset data file */ /* Request codeset data file */
ret = request_firmware(&fw_entry, "haup-ir-blaster.bin", tx->ir->l.dev); ret = request_firmware(&fw_entry, "haup-ir-blaster.bin", tx->ir->l.dev);
if (ret != 0) { if (ret != 0) {
dev_err(tx->ir->l.dev, "firmware haup-ir-blaster.bin not available (%d)\n", dev_err(tx->ir->l.dev,
ret); "firmware haup-ir-blaster.bin not available (%d)\n",
ret);
ret = ret < 0 ? ret : -EFAULT; ret = ret < 0 ? ret : -EFAULT;
goto out; goto out;
} }
...@@ -812,7 +814,7 @@ static int fw_load(struct IR_tx *tx) ...@@ -812,7 +814,7 @@ static int fw_load(struct IR_tx *tx)
goto corrupt; goto corrupt;
dev_dbg(tx->ir->l.dev, "%u IR blaster codesets loaded\n", dev_dbg(tx->ir->l.dev, "%u IR blaster codesets loaded\n",
tx_data->num_code_sets); tx_data->num_code_sets);
tx_data->code_sets = vmalloc( tx_data->code_sets = vmalloc(
tx_data->num_code_sets * sizeof(char *)); tx_data->num_code_sets * sizeof(char *));
...@@ -942,8 +944,9 @@ static ssize_t read(struct file *filep, char __user *outbuf, size_t n, ...@@ -942,8 +944,9 @@ static ssize_t read(struct file *filep, char __user *outbuf, size_t n,
unsigned char buf[MAX_XFER_SIZE]; unsigned char buf[MAX_XFER_SIZE];
if (rbuf->chunk_size > sizeof(buf)) { if (rbuf->chunk_size > sizeof(buf)) {
dev_err(ir->l.dev, "chunk_size is too big (%d)!\n", dev_err(ir->l.dev,
rbuf->chunk_size); "chunk_size is too big (%d)!\n",
rbuf->chunk_size);
ret = -EINVAL; ret = -EINVAL;
break; break;
} }
...@@ -966,8 +969,8 @@ static ssize_t read(struct file *filep, char __user *outbuf, size_t n, ...@@ -966,8 +969,8 @@ static ssize_t read(struct file *filep, char __user *outbuf, size_t n,
put_ir_rx(rx, false); put_ir_rx(rx, false);
set_current_state(TASK_RUNNING); set_current_state(TASK_RUNNING);
dev_dbg(ir->l.dev, "read result = %d (%s)\n", dev_dbg(ir->l.dev, "read result = %d (%s)\n", ret,
ret, ret ? "Error" : "OK"); ret ? "Error" : "OK");
return ret ? ret : written; return ret ? ret : written;
} }
...@@ -1079,7 +1082,7 @@ static int send_code(struct IR_tx *tx, unsigned int code, unsigned int key) ...@@ -1079,7 +1082,7 @@ static int send_code(struct IR_tx *tx, unsigned int code, unsigned int key)
} }
if (buf[0] != 0x80) { if (buf[0] != 0x80) {
dev_err(tx->ir->l.dev, "unexpected IR TX response #2: %02x\n", dev_err(tx->ir->l.dev, "unexpected IR TX response #2: %02x\n",
buf[0]); buf[0]);
return -EFAULT; return -EFAULT;
} }
...@@ -1231,7 +1234,7 @@ static unsigned int poll(struct file *filep, poll_table *wait) ...@@ -1231,7 +1234,7 @@ static unsigned int poll(struct file *filep, poll_table *wait)
ret = lirc_buffer_empty(rbuf) ? 0 : (POLLIN|POLLRDNORM); ret = lirc_buffer_empty(rbuf) ? 0 : (POLLIN|POLLRDNORM);
dev_dbg(ir->l.dev, "poll result = %s\n", dev_dbg(ir->l.dev, "poll result = %s\n",
ret ? "POLLIN|POLLRDNORM" : "none"); ret ? "POLLIN|POLLRDNORM" : "none");
return ret; return ret;
} }
...@@ -1338,7 +1341,8 @@ static int close(struct inode *node, struct file *filep) ...@@ -1338,7 +1341,8 @@ static int close(struct inode *node, struct file *filep)
struct IR *ir = filep->private_data; struct IR *ir = filep->private_data;
if (ir == NULL) { if (ir == NULL) {
dev_err(ir->l.dev, "close: no private_data attached to the file!\n"); dev_err(ir->l.dev,
"close: no private_data attached to the file!\n");
return -ENODEV; return -ENODEV;
} }
...@@ -1609,13 +1613,15 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id) ...@@ -1609,13 +1613,15 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
ir->l.minor = minor; /* module option: user requested minor number */ ir->l.minor = minor; /* module option: user requested minor number */
ir->l.minor = lirc_register_driver(&ir->l); ir->l.minor = lirc_register_driver(&ir->l);
if (ir->l.minor < 0 || ir->l.minor >= MAX_IRCTL_DEVICES) { if (ir->l.minor < 0 || ir->l.minor >= MAX_IRCTL_DEVICES) {
dev_err(tx->ir->l.dev, "%s: \"minor\" must be between 0 and %d (%d)!\n", dev_err(tx->ir->l.dev,
__func__, MAX_IRCTL_DEVICES-1, ir->l.minor); "%s: \"minor\" must be between 0 and %d (%d)!\n",
__func__, MAX_IRCTL_DEVICES-1, ir->l.minor);
ret = -EBADRQC; ret = -EBADRQC;
goto out_put_xx; goto out_put_xx;
} }
dev_info(ir->l.dev, "IR unit on %s (i2c-%d) registered as lirc%d and ready\n", dev_info(ir->l.dev,
adap->name, adap->nr, ir->l.minor); "IR unit on %s (i2c-%d) registered as lirc%d and ready\n",
adap->name, adap->nr, ir->l.minor);
out_ok: out_ok:
if (rx != NULL) if (rx != NULL)
...@@ -1623,8 +1629,9 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id) ...@@ -1623,8 +1629,9 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
if (tx != NULL) if (tx != NULL)
put_ir_tx(tx, true); put_ir_tx(tx, true);
put_ir_device(ir, true); put_ir_device(ir, true);
dev_info(ir->l.dev, "probe of IR %s on %s (i2c-%d) done\n", dev_info(ir->l.dev,
tx_probe ? "Tx" : "Rx", adap->name, adap->nr); "probe of IR %s on %s (i2c-%d) done\n",
tx_probe ? "Tx" : "Rx", adap->name, adap->nr);
mutex_unlock(&ir_devices_lock); mutex_unlock(&ir_devices_lock);
return 0; return 0;
...@@ -1636,9 +1643,9 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id) ...@@ -1636,9 +1643,9 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
out_put_ir: out_put_ir:
put_ir_device(ir, true); put_ir_device(ir, true);
out_no_ir: out_no_ir:
dev_err(&client->dev, "%s: probing IR %s on %s (i2c-%d) failed with %d\n", dev_err(&client->dev,
__func__, tx_probe ? "Tx" : "Rx", adap->name, adap->nr, "%s: probing IR %s on %s (i2c-%d) failed with %d\n",
ret); __func__, tx_probe ? "Tx" : "Rx", adap->name, adap->nr, ret);
mutex_unlock(&ir_devices_lock); mutex_unlock(&ir_devices_lock);
return ret; return ret;
} }
......
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