diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2012-01-06 23:42:52 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2012-01-06 23:42:52 +0400 |
commit | ff4b8a57f0aaa2882d444ca44b2b9b333d22a4df (patch) | |
tree | d851c923f85566572112d4c0f884cff388a3cc05 /arch/mips | |
parent | 805a6af8dba5dfdd35ec35dc52ec0122400b2610 (diff) | |
parent | ea04018e6bc5ddb2f0466c0e5b986bd4901b7e8e (diff) | |
download | linux-ff4b8a57f0aaa2882d444ca44b2b9b333d22a4df.tar.xz |
Merge branch 'driver-core-next' into Linux 3.2
This resolves the conflict in the arch/arm/mach-s3c64xx/s3c6400.c file,
and it fixes the build error in the arch/x86/kernel/microcode_core.c
file, that the merge did not catch.
The microcode_core.c patch was provided by Stephen Rothwell
<sfr@canb.auug.org.au> who was invaluable in the merge issues involved
with the large sysdev removal process in the driver-core tree.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/txx9/generic/7segled.c | 44 | ||||
-rw-r--r-- | arch/mips/txx9/generic/setup.c | 34 | ||||
-rw-r--r-- | arch/mips/txx9/generic/setup_tx4939.c | 2 |
3 files changed, 39 insertions, 41 deletions
diff --git a/arch/mips/txx9/generic/7segled.c b/arch/mips/txx9/generic/7segled.c index 7f8416f86222..8e93b2122524 100644 --- a/arch/mips/txx9/generic/7segled.c +++ b/arch/mips/txx9/generic/7segled.c @@ -9,7 +9,7 @@ * (C) Copyright TOSHIBA CORPORATION 2005-2007 * All Rights Reserved. */ -#include <linux/sysdev.h> +#include <linux/device.h> #include <linux/slab.h> #include <linux/map_to_7segment.h> #include <asm/txx9/generic.h> @@ -37,8 +37,8 @@ int txx9_7segled_putc(unsigned int pos, char c) return 0; } -static ssize_t ascii_store(struct sys_device *dev, - struct sysdev_attribute *attr, +static ssize_t ascii_store(struct device *dev, + struct device_attribute *attr, const char *buf, size_t size) { unsigned int ch = dev->id; @@ -46,8 +46,8 @@ static ssize_t ascii_store(struct sys_device *dev, return size; } -static ssize_t raw_store(struct sys_device *dev, - struct sysdev_attribute *attr, +static ssize_t raw_store(struct device *dev, + struct device_attribute *attr, const char *buf, size_t size) { unsigned int ch = dev->id; @@ -55,19 +55,19 @@ static ssize_t raw_store(struct sys_device *dev, return size; } -static SYSDEV_ATTR(ascii, 0200, NULL, ascii_store); -static SYSDEV_ATTR(raw, 0200, NULL, raw_store); +static DEVICE_ATTR(ascii, 0200, NULL, ascii_store); +static DEVICE_ATTR(raw, 0200, NULL, raw_store); -static ssize_t map_seg7_show(struct sysdev_class *class, - struct sysdev_class_attribute *attr, +static ssize_t map_seg7_show(struct device *dev, + struct device_attribute *attr, char *buf) { memcpy(buf, &txx9_seg7map, sizeof(txx9_seg7map)); return sizeof(txx9_seg7map); } -static ssize_t map_seg7_store(struct sysdev_class *class, - struct sysdev_class_attribute *attr, +static ssize_t map_seg7_store(struct device *dev, + struct device_attribute *attr, const char *buf, size_t size) { if (size != sizeof(txx9_seg7map)) @@ -76,10 +76,11 @@ static ssize_t map_seg7_store(struct sysdev_class *class, return size; } -static SYSDEV_CLASS_ATTR(map_seg7, 0600, map_seg7_show, map_seg7_store); +static DEVICE_ATTR(map_seg7, 0600, map_seg7_show, map_seg7_store); -static struct sysdev_class tx_7segled_sysdev_class = { - .name = "7segled", +static struct bus_type tx_7segled_subsys = { + .name = "7segled", + .dev_name = "7segled", }; static int __init tx_7segled_init_sysfs(void) @@ -87,26 +88,25 @@ static int __init tx_7segled_init_sysfs(void) int error, i; if (!tx_7segled_num) return -ENODEV; - error = sysdev_class_register(&tx_7segled_sysdev_class); + error = subsys_system_register(&tx_7segled_subsys, NULL); if (error) return error; - error = sysdev_class_create_file(&tx_7segled_sysdev_class, - &attr_map_seg7); + error = device_create_file(tx_7segled_subsys.dev_root, &dev_attr_map_seg7); if (error) return error; for (i = 0; i < tx_7segled_num; i++) { - struct sys_device *dev; + struct device *dev; dev = kzalloc(sizeof(*dev), GFP_KERNEL); if (!dev) { error = -ENODEV; break; } dev->id = i; - dev->cls = &tx_7segled_sysdev_class; - error = sysdev_register(dev); + dev->dev = &tx_7segled_subsys; + error = device_register(dev); if (!error) { - sysdev_create_file(dev, &attr_ascii); - sysdev_create_file(dev, &attr_raw); + device_create_file(dev, &dev_attr_ascii); + device_create_file(dev, &dev_attr_raw); } } return error; diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c index ec38e00b2559..ae77a7916c03 100644 --- a/arch/mips/txx9/generic/setup.c +++ b/arch/mips/txx9/generic/setup.c @@ -22,7 +22,7 @@ #include <linux/serial_core.h> #include <linux/mtd/physmap.h> #include <linux/leds.h> -#include <linux/sysdev.h> +#include <linux/device.h> #include <linux/slab.h> #include <linux/irq.h> #include <asm/bootinfo.h> @@ -897,10 +897,13 @@ void __init txx9_aclc_init(unsigned long baseaddr, int irq, #endif } -static struct sysdev_class txx9_sramc_sysdev_class; +static struct bus_type txx9_sramc_subsys = { + .name = "txx9_sram", + .dev_name = "txx9_sram", +}; -struct txx9_sramc_sysdev { - struct sys_device dev; +struct txx9_sramc_dev { + struct device dev; struct bin_attribute bindata_attr; void __iomem *base; }; @@ -909,7 +912,7 @@ static ssize_t txx9_sram_read(struct file *filp, struct kobject *kobj, struct bin_attribute *bin_attr, char *buf, loff_t pos, size_t size) { - struct txx9_sramc_sysdev *dev = bin_attr->private; + struct txx9_sramc_dev *dev = bin_attr->private; size_t ramsize = bin_attr->size; if (pos >= ramsize) @@ -924,7 +927,7 @@ static ssize_t txx9_sram_write(struct file *filp, struct kobject *kobj, struct bin_attribute *bin_attr, char *buf, loff_t pos, size_t size) { - struct txx9_sramc_sysdev *dev = bin_attr->private; + struct txx9_sramc_dev *dev = bin_attr->private; size_t ramsize = bin_attr->size; if (pos >= ramsize) @@ -937,18 +940,13 @@ static ssize_t txx9_sram_write(struct file *filp, struct kobject *kobj, void __init txx9_sramc_init(struct resource *r) { - struct txx9_sramc_sysdev *dev; + struct txx9_sramc_dev *dev; size_t size; int err; - if (!txx9_sramc_sysdev_class.name) { - txx9_sramc_sysdev_class.name = "txx9_sram"; - err = sysdev_class_register(&txx9_sramc_sysdev_class); - if (err) { - txx9_sramc_sysdev_class.name = NULL; - return; - } - } + err = subsys_system_register(&txx9_sramc_subsys, NULL); + if (err) + return; dev = kzalloc(sizeof(*dev), GFP_KERNEL); if (!dev) return; @@ -956,7 +954,7 @@ void __init txx9_sramc_init(struct resource *r) dev->base = ioremap(r->start, size); if (!dev->base) goto exit; - dev->dev.cls = &txx9_sramc_sysdev_class; + dev->dev.bus = &txx9_sramc_subsys; sysfs_bin_attr_init(&dev->bindata_attr); dev->bindata_attr.attr.name = "bindata"; dev->bindata_attr.attr.mode = S_IRUSR | S_IWUSR; @@ -964,12 +962,12 @@ void __init txx9_sramc_init(struct resource *r) dev->bindata_attr.write = txx9_sram_write; dev->bindata_attr.size = size; dev->bindata_attr.private = dev; - err = sysdev_register(&dev->dev); + err = device_register(&dev->dev); if (err) goto exit; err = sysfs_create_bin_file(&dev->dev.kobj, &dev->bindata_attr); if (err) { - sysdev_unregister(&dev->dev); + device_unregister(&dev->dev); goto exit; } return; diff --git a/arch/mips/txx9/generic/setup_tx4939.c b/arch/mips/txx9/generic/setup_tx4939.c index ba3cec3155df..6567895d1f59 100644 --- a/arch/mips/txx9/generic/setup_tx4939.c +++ b/arch/mips/txx9/generic/setup_tx4939.c @@ -15,7 +15,7 @@ #include <linux/delay.h> #include <linux/netdevice.h> #include <linux/notifier.h> -#include <linux/sysdev.h> +#include <linux/device.h> #include <linux/ethtool.h> #include <linux/param.h> #include <linux/ptrace.h> |