mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
pcmcia: Switch to using the new API kobj_to_dev()
fixed the following coccicheck: drivers/pcmcia/cistpl.c:1557:54-55: WARNING opportunity for kobj_to_dev() drivers/pcmcia/cistpl.c:1584:53-54: WARNING opportunity for kobj_to_dev() Signed-off-by: Tian Tao <tiantao6@hisilicon.com> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
This commit is contained in:
committed by
Dominik Brodowski
parent
e71ba9452f
commit
4ce6b242b7
@@ -1554,7 +1554,7 @@ static ssize_t pccard_show_cis(struct file *filp, struct kobject *kobj,
|
|||||||
if (off + count > size)
|
if (off + count > size)
|
||||||
count = size - off;
|
count = size - off;
|
||||||
|
|
||||||
s = to_socket(container_of(kobj, struct device, kobj));
|
s = to_socket(kobj_to_dev(kobj));
|
||||||
|
|
||||||
if (!(s->state & SOCKET_PRESENT))
|
if (!(s->state & SOCKET_PRESENT))
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
@@ -1581,7 +1581,7 @@ static ssize_t pccard_store_cis(struct file *filp, struct kobject *kobj,
|
|||||||
if (error)
|
if (error)
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
s = to_socket(container_of(kobj, struct device, kobj));
|
s = to_socket(kobj_to_dev(kobj));
|
||||||
|
|
||||||
if (off)
|
if (off)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
Reference in New Issue
Block a user