sh: intc - convert sysdev_class to a regular subsystem
After all sysdev classes are ported to regular driver core entities, the sysdev implementation will be entirely removed from the kernel. Cc: Paul Mundt <lethal@linux-sh.org> Cc: Magnus Damm <magnus.damm@gmail.com> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
86ba41d033
commit
f4e73bfcd9
@@ -10,7 +10,7 @@
|
||||
#define pr_fmt(fmt) "intc: " fmt
|
||||
|
||||
#include <linux/errno.h>
|
||||
#include <linux/sysdev.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/stat.h>
|
||||
@@ -20,15 +20,15 @@
|
||||
static void __iomem *uimask;
|
||||
|
||||
static ssize_t
|
||||
show_intc_userimask(struct sysdev_class *cls,
|
||||
struct sysdev_class_attribute *attr, char *buf)
|
||||
show_intc_userimask(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
return sprintf(buf, "%d\n", (__raw_readl(uimask) >> 4) & 0xf);
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
store_intc_userimask(struct sysdev_class *cls,
|
||||
struct sysdev_class_attribute *attr,
|
||||
store_intc_userimask(struct device *dev,
|
||||
struct device_attribute *attr,
|
||||
const char *buf, size_t count)
|
||||
{
|
||||
unsigned long level;
|
||||
@@ -55,8 +55,8 @@ store_intc_userimask(struct sysdev_class *cls,
|
||||
return count;
|
||||
}
|
||||
|
||||
static SYSDEV_CLASS_ATTR(userimask, S_IRUSR | S_IWUSR,
|
||||
show_intc_userimask, store_intc_userimask);
|
||||
static DEVICE_ATTR(userimask, S_IRUSR | S_IWUSR,
|
||||
show_intc_userimask, store_intc_userimask);
|
||||
|
||||
|
||||
static int __init userimask_sysdev_init(void)
|
||||
@@ -64,7 +64,7 @@ static int __init userimask_sysdev_init(void)
|
||||
if (unlikely(!uimask))
|
||||
return -ENXIO;
|
||||
|
||||
return sysdev_class_create_file(&intc_sysdev_class, &attr_userimask);
|
||||
return device_create_file(intc_subsys.dev_root, &dev_attr_userimask);
|
||||
}
|
||||
late_initcall(userimask_sysdev_init);
|
||||
|
||||
|
Reference in New Issue
Block a user