Commit 93c42c0b authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

sh: intc: move to use bus_get_dev_root()

Direct access to the struct bus_type dev_root pointer is going away soon
so replace that with a call to bus_get_dev_root() instead, which is what
it is there for.

Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
Cc: linux-sh@vger.kernel.org
Acked-by: default avatarJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Link: https://lore.kernel.org/r/20230313182918.1312597-17-gregkh@linuxfoundation.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f6d1975c
...@@ -61,10 +61,18 @@ static DEVICE_ATTR(userimask, S_IRUSR | S_IWUSR, ...@@ -61,10 +61,18 @@ static DEVICE_ATTR(userimask, S_IRUSR | S_IWUSR,
static int __init userimask_sysdev_init(void) static int __init userimask_sysdev_init(void)
{ {
struct device *dev_root;
int ret = 0;
if (unlikely(!uimask)) if (unlikely(!uimask))
return -ENXIO; return -ENXIO;
return device_create_file(intc_subsys.dev_root, &dev_attr_userimask); dev_root = bus_get_dev_root(&intc_subsys);
if (dev_root) {
ret = device_create_file(dev_root, &dev_attr_userimask);
put_device(dev_root);
}
return ret;
} }
late_initcall(userimask_sysdev_init); late_initcall(userimask_sysdev_init);
......
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