2020-11-23 02:32:23

by Tian Tao

[permalink] [raw]
Subject: [PATCH] wlcore: Switch to using the new API kobj_to_dev()

Switch to using the new API kobj_to_dev().

Signed-off-by: Tian Tao <[email protected]>
---
drivers/net/wireless/ti/wlcore/sysfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ti/wlcore/sysfs.c b/drivers/net/wireless/ti/wlcore/sysfs.c
index 7ac1814..5cf0379 100644
--- a/drivers/net/wireless/ti/wlcore/sysfs.c
+++ b/drivers/net/wireless/ti/wlcore/sysfs.c
@@ -100,7 +100,7 @@ static ssize_t wl1271_sysfs_read_fwlog(struct file *filp, struct kobject *kobj,
struct bin_attribute *bin_attr,
char *buffer, loff_t pos, size_t count)
{
- struct device *dev = container_of(kobj, struct device, kobj);
+ struct device *dev = kobj_to_dev(kobj);
struct wl1271 *wl = dev_get_drvdata(dev);
ssize_t len;
int ret;
--
2.7.4


2020-12-02 19:26:57

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] wlcore: Switch to using the new API kobj_to_dev()

Tian Tao <[email protected]> wrote:

> Switch to using the new API kobj_to_dev().
>
> Signed-off-by: Tian Tao <[email protected]>

Patch applied to wireless-drivers-next.git, thanks.

3b52cf6242b4 wlcore: Switch to using the new API kobj_to_dev()

--
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches