Commit d44e07c7 authored by Ricardo Silva's avatar Ricardo Silva Committed by Mauro Carvalho Chehab

[media] lirc_zilog: Use sizeof(*p) instead of sizeof(struct P)

Fix all checkpatch reported issues for "CHECK: Prefer
kzalloc(sizeof(*<p>)...) over kzalloc(sizeof(struct <P>)...)".

Other similar case in the code already using recommended style, so make
it all consistent with the recommended practice.
Signed-off-by: default avatarRicardo Silva <rjpdasilva@gmail.com>
Signed-off-by: default avatarSean Young <sean@mess.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 41a603f8
...@@ -1462,7 +1462,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id) ...@@ -1462,7 +1462,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
/* Use a single struct IR instance for both the Rx and Tx functions */ /* Use a single struct IR instance for both the Rx and Tx functions */
ir = get_ir_device_by_adapter(adap); ir = get_ir_device_by_adapter(adap);
if (!ir) { if (!ir) {
ir = kzalloc(sizeof(struct IR), GFP_KERNEL); ir = kzalloc(sizeof(*ir), GFP_KERNEL);
if (!ir) { if (!ir) {
ret = -ENOMEM; ret = -ENOMEM;
goto out_no_ir; goto out_no_ir;
...@@ -1502,7 +1502,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id) ...@@ -1502,7 +1502,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
rx = get_ir_rx(ir); rx = get_ir_rx(ir);
/* Set up a struct IR_tx instance */ /* Set up a struct IR_tx instance */
tx = kzalloc(sizeof(struct IR_tx), GFP_KERNEL); tx = kzalloc(sizeof(*tx), GFP_KERNEL);
if (!tx) { if (!tx) {
ret = -ENOMEM; ret = -ENOMEM;
goto out_put_xx; goto out_put_xx;
...@@ -1546,7 +1546,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id) ...@@ -1546,7 +1546,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
tx = get_ir_tx(ir); tx = get_ir_tx(ir);
/* Set up a struct IR_rx instance */ /* Set up a struct IR_rx instance */
rx = kzalloc(sizeof(struct IR_rx), GFP_KERNEL); rx = kzalloc(sizeof(*rx), GFP_KERNEL);
if (!rx) { if (!rx) {
ret = -ENOMEM; ret = -ENOMEM;
goto out_put_xx; goto out_put_xx;
......
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