diff options
| author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-01-07 09:42:53 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-01-07 09:42:53 -0800 |
| commit | 8bcb462400279f284689ebb62203b9995c964887 (patch) | |
| tree | 4d774039d0f262f699af1b91121e02430bd39607 | |
| parent | 44acdb7912fa6665fd1c16e1a4241d18d5b0dcc0 (diff) | |
| download | patches-8bcb462400279f284689ebb62203b9995c964887.tar.gz | |
remove driver-core/ patches that are now in Linus's tree
60 files changed, 0 insertions, 6089 deletions
diff --git a/driver-core/bus_id-arm.patch b/driver-core/bus_id-arm.patch deleted file mode 100644 index 221c44d1e64516..00000000000000 --- a/driver-core/bus_id-arm.patch +++ /dev/null @@ -1,201 +0,0 @@ -From: Kay Sievers <kay.sievers@vrfy.org> -Subject: arm: struct device - replace bus_id with dev_name(), dev_set_name() - -Cc: Russell King <rmk@arm.linux.org.uk> -Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> ---- - arch/arm/kernel/ecard.c | 2 +- - arch/arm/mach-aaec2000/core.c | 2 +- - arch/arm/mach-ep93xx/core.c | 6 +++--- - arch/arm/mach-integrator/core.c | 10 +++++----- - arch/arm/mach-integrator/integrator_cp.c | 6 +++--- - arch/arm/mach-lh7a40x/clcd.c | 2 +- - arch/arm/mach-netx/fb.c | 2 +- - arch/arm/mach-realview/core.h | 2 +- - arch/arm/mach-versatile/core.h | 2 +- - arch/arm/plat-omap/include/mach/memory.h | 2 +- - 10 files changed, 18 insertions(+), 18 deletions(-) - ---- a/arch/arm/kernel/ecard.c -+++ b/arch/arm/kernel/ecard.c -@@ -817,7 +817,7 @@ static struct expansion_card *__init eca - ec->dma = NO_DMA; - ec->ops = &ecard_default_ops; - -- snprintf(ec->dev.bus_id, sizeof(ec->dev.bus_id), "ecard%d", slot); -+ dev_set_name(&ec->dev, "ecard%d", slot); - ec->dev.parent = NULL; - ec->dev.bus = &ecard_bus_type; - ec->dev.dma_mask = &ec->dma_mask; ---- a/arch/arm/mach-aaec2000/core.c -+++ b/arch/arm/mach-aaec2000/core.c -@@ -212,7 +212,7 @@ static struct clcd_board clcd_plat_data - - static struct amba_device clcd_device = { - .dev = { -- .bus_id = "mb:16", -+ .init_name = "mb:16", - .coherent_dma_mask = ~0, - .platform_data = &clcd_plat_data, - }, ---- a/arch/arm/mach-ep93xx/core.c -+++ b/arch/arm/mach-ep93xx/core.c -@@ -409,7 +409,7 @@ static struct amba_pl010_data ep93xx_uar - - static struct amba_device uart1_device = { - .dev = { -- .bus_id = "apb:uart1", -+ .init_name = "apb:uart1", - .platform_data = &ep93xx_uart_data, - }, - .res = { -@@ -423,7 +423,7 @@ static struct amba_device uart1_device = - - static struct amba_device uart2_device = { - .dev = { -- .bus_id = "apb:uart2", -+ .init_name = "apb:uart2", - .platform_data = &ep93xx_uart_data, - }, - .res = { -@@ -437,7 +437,7 @@ static struct amba_device uart2_device = - - static struct amba_device uart3_device = { - .dev = { -- .bus_id = "apb:uart3", -+ .init_name = "apb:uart3", - .platform_data = &ep93xx_uart_data, - }, - .res = { ---- a/arch/arm/mach-integrator/core.c -+++ b/arch/arm/mach-integrator/core.c -@@ -37,7 +37,7 @@ static struct amba_pl010_data integrator - - static struct amba_device rtc_device = { - .dev = { -- .bus_id = "mb:15", -+ .init_name = "mb:15", - }, - .res = { - .start = INTEGRATOR_RTC_BASE, -@@ -50,7 +50,7 @@ static struct amba_device rtc_device = { - - static struct amba_device uart0_device = { - .dev = { -- .bus_id = "mb:16", -+ .init_name = "mb:16", - .platform_data = &integrator_uart_data, - }, - .res = { -@@ -64,7 +64,7 @@ static struct amba_device uart0_device = - - static struct amba_device uart1_device = { - .dev = { -- .bus_id = "mb:17", -+ .init_name = "mb:17", - .platform_data = &integrator_uart_data, - }, - .res = { -@@ -78,7 +78,7 @@ static struct amba_device uart1_device = - - static struct amba_device kmi0_device = { - .dev = { -- .bus_id = "mb:18", -+ .init_name = "mb:18", - }, - .res = { - .start = KMI0_BASE, -@@ -91,7 +91,7 @@ static struct amba_device kmi0_device = - - static struct amba_device kmi1_device = { - .dev = { -- .bus_id = "mb:19", -+ .init_name = "mb:19", - }, - .res = { - .start = KMI1_BASE, ---- a/arch/arm/mach-integrator/integrator_cp.c -+++ b/arch/arm/mach-integrator/integrator_cp.c -@@ -407,7 +407,7 @@ static struct mmc_platform_data mmc_data - - static struct amba_device mmc_device = { - .dev = { -- .bus_id = "mb:1c", -+ .init_name = "mb:1c", - .platform_data = &mmc_data, - }, - .res = { -@@ -421,7 +421,7 @@ static struct amba_device mmc_device = { - - static struct amba_device aaci_device = { - .dev = { -- .bus_id = "mb:1d", -+ .init_name = "mb:1d", - }, - .res = { - .start = INTCP_PA_AACI_BASE, -@@ -532,7 +532,7 @@ static struct clcd_board clcd_data = { - - static struct amba_device clcd_device = { - .dev = { -- .bus_id = "mb:c0", -+ .init_name = "mb:c0", - .coherent_dma_mask = ~0, - .platform_data = &clcd_data, - }, ---- a/arch/arm/mach-lh7a40x/clcd.c -+++ b/arch/arm/mach-lh7a40x/clcd.c -@@ -207,7 +207,7 @@ static struct clcd_board clcd_platform_d - static struct amba_device name##_device = { \ - .dev = { \ - .coherent_dma_mask = ~0, \ -- .bus_id = busid, \ -+ .init_name = busid, \ - .platform_data = plat, \ - }, \ - .res = { \ ---- a/arch/arm/mach-netx/fb.c -+++ b/arch/arm/mach-netx/fb.c -@@ -91,7 +91,7 @@ void clk_put(struct clk *clk) - - static struct amba_device fb_device = { - .dev = { -- .bus_id = "fb", -+ .init_name = "fb", - .coherent_dma_mask = ~0, - }, - .res = { ---- a/arch/arm/mach-realview/core.h -+++ b/arch/arm/mach-realview/core.h -@@ -31,7 +31,7 @@ - static struct amba_device name##_device = { \ - .dev = { \ - .coherent_dma_mask = ~0, \ -- .bus_id = busid, \ -+ .init_name = busid, \ - .platform_data = plat, \ - }, \ - .res = { \ ---- a/arch/arm/mach-versatile/core.h -+++ b/arch/arm/mach-versatile/core.h -@@ -34,7 +34,7 @@ extern unsigned int mmc_status(struct de - static struct amba_device name##_device = { \ - .dev = { \ - .coherent_dma_mask = ~0, \ -- .bus_id = busid, \ -+ .init_name = busid, \ - .platform_data = plat, \ - }, \ - .res = { \ ---- a/arch/arm/plat-omap/include/mach/memory.h -+++ b/arch/arm/plat-omap/include/mach/memory.h -@@ -59,7 +59,7 @@ - - #define virt_to_lbus(x) ((x) - PAGE_OFFSET + OMAP1510_LB_OFFSET) - #define lbus_to_virt(x) ((x) - OMAP1510_LB_OFFSET + PAGE_OFFSET) --#define is_lbus_device(dev) (cpu_is_omap15xx() && dev && (strncmp(dev->bus_id, "ohci", 4) == 0)) -+#define is_lbus_device(dev) (cpu_is_omap15xx() && dev && (strncmp(dev_name(dev), "ohci", 4) == 0)) - - #define __arch_page_to_dma(dev, page) ({is_lbus_device(dev) ? \ - (dma_addr_t)virt_to_lbus(page_address(page)) : \ diff --git a/driver-core/bus_id-ata.patch b/driver-core/bus_id-ata.patch deleted file mode 100644 index 6c3aa15656bad0..00000000000000 --- a/driver-core/bus_id-ata.patch +++ /dev/null @@ -1,22 +0,0 @@ -From: Kay Sievers <kay.sievers@vrfy.org> -Subject: libata: struct device - replace bus_id with dev_name(), dev_set_name() - -Cc: Jeff Garzik <jgarzik@redhat.com> -Cc: Tejun Heo <tj@kernel.org> -Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> ---- - drivers/ata/libata-scsi.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/ata/libata-scsi.c -+++ b/drivers/ata/libata-scsi.c -@@ -3369,7 +3369,7 @@ static void ata_scsi_remove_dev(struct a - - if (sdev) { - ata_dev_printk(dev, KERN_INFO, "detaching (SCSI %s)\n", -- sdev->sdev_gendev.bus_id); -+ dev_name(&sdev->sdev_gendev)); - - scsi_remove_device(sdev); - scsi_device_put(sdev); diff --git a/driver-core/bus_id-avr.patch b/driver-core/bus_id-avr.patch deleted file mode 100644 index 220d6b78555570..00000000000000 --- a/driver-core/bus_id-avr.patch +++ /dev/null @@ -1,30 +0,0 @@ -From: Kay Sievers <kay.sievers@vrfy.org> -Subject: avr: struct device - replace bus_id with dev_name(), dev_set_name() - -Cc: Haavard Skinnemoen <hskinnemoen@atmel.com> -Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> ---- - arch/avr32/mach-at32ap/clock.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/arch/avr32/mach-at32ap/clock.c -+++ b/arch/avr32/mach-at32ap/clock.c -@@ -198,7 +198,7 @@ dump_clock(struct clk *parent, struct cl - unsigned i; - - /* skip clocks coupled to devices that aren't registered */ -- if (parent->dev && !parent->dev->bus_id[0] && !parent->users) -+ if (parent->dev && !dev_name(parent->dev) && !parent->users) - return; - - /* <nest spaces> name <pad to end> */ -@@ -214,7 +214,7 @@ dump_clock(struct clk *parent, struct cl - parent->users ? "on" : "off", /* NOTE: not-paranoid!! */ - clk_get_rate(parent)); - if (parent->dev) -- seq_printf(r->s, ", for %s", parent->dev->bus_id); -+ seq_printf(r->s, ", for %s", dev_name(parent->dev)); - seq_printf(r->s, "\n"); - - /* cost of this scan is small, but not linear... */ diff --git a/driver-core/bus_id-block.patch b/driver-core/bus_id-block.patch deleted file mode 100644 index 03c8a68dcffe21..00000000000000 --- a/driver-core/bus_id-block.patch +++ /dev/null @@ -1,84 +0,0 @@ -From: Kay Sievers <kay.sievers@vrfy.org> -Subject: block: struct device - replace bus_id with dev_name(), dev_set_name() - -Cc: Jens Axboe <jens.axboe@oracle.com> -Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> ---- - block/bsg.c | 6 +++--- - block/genhd.c | 2 +- - fs/partitions/check.c | 11 +++-------- - 3 files changed, 7 insertions(+), 12 deletions(-) - ---- a/block/bsg.c -+++ b/block/bsg.c -@@ -42,7 +42,7 @@ struct bsg_device { - int done_cmds; - wait_queue_head_t wq_done; - wait_queue_head_t wq_free; -- char name[BUS_ID_SIZE]; -+ char name[20]; - int max_queue; - unsigned long flags; - }; -@@ -781,7 +781,7 @@ static struct bsg_device *bsg_add_device - mutex_lock(&bsg_mutex); - hlist_add_head(&bd->dev_list, bsg_dev_idx_hash(iminor(inode))); - -- strncpy(bd->name, rq->bsg_dev.class_dev->bus_id, sizeof(bd->name) - 1); -+ strncpy(bd->name, dev_name(rq->bsg_dev.class_dev), sizeof(bd->name) - 1); - dprintk("bound to <%s>, max queue %d\n", - format_dev_t(buf, inode->i_rdev), bd->max_queue); - -@@ -992,7 +992,7 @@ int bsg_register_queue(struct request_qu - if (name) - devname = name; - else -- devname = parent->bus_id; -+ devname = dev_name(parent); - - /* - * we need a proper transport to send commands, not a stacked device ---- a/block/genhd.c -+++ b/block/genhd.c -@@ -1084,7 +1084,7 @@ dev_t blk_lookup_devt(const char *name, - struct gendisk *disk = dev_to_disk(dev); - struct hd_struct *part; - -- if (strcmp(dev->bus_id, name)) -+ if (strcmp(dev_name(dev), name)) - continue; - - part = disk_get_part(disk, partno); ---- a/fs/partitions/check.c -+++ b/fs/partitions/check.c -@@ -384,9 +384,9 @@ struct hd_struct *add_partition(struct g - - dname = dev_name(ddev); - if (isdigit(dname[strlen(dname) - 1])) -- snprintf(pdev->bus_id, BUS_ID_SIZE, "%sp%d", dname, partno); -+ dev_set_name(pdev, "%sp%d", dname, partno); - else -- snprintf(pdev->bus_id, BUS_ID_SIZE, "%s%d", dname, partno); -+ dev_set_name(pdev, "%s%d", dname, partno); - - device_initialize(pdev); - pdev->class = &block_class; -@@ -447,16 +447,11 @@ void register_disk(struct gendisk *disk) - struct block_device *bdev; - struct disk_part_iter piter; - struct hd_struct *part; -- char *s; - int err; - - ddev->parent = disk->driverfs_dev; - -- strlcpy(ddev->bus_id, disk->disk_name, BUS_ID_SIZE); -- /* ewww... some of these buggers have / in the name... */ -- s = strchr(ddev->bus_id, '/'); -- if (s) -- *s = '!'; -+ dev_set_name(ddev, disk->disk_name); - - /* delay uevents, until we scanned partition table */ - ddev->uevent_suppress = 1; diff --git a/driver-core/bus_id-chris.patch b/driver-core/bus_id-chris.patch deleted file mode 100644 index f1ff2a50125490..00000000000000 --- a/driver-core/bus_id-chris.patch +++ /dev/null @@ -1,28 +0,0 @@ -From: Kay Sievers <kay.sievers@vrfy.org> -Subject: chris: struct device - replace bus_id with dev_name(), dev_set_name() - -Cc: Jesper Nilsson <jesper.nilsson@axis.com> -Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> ---- - arch/cris/arch-v32/drivers/iop_fw_load.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - ---- a/arch/cris/arch-v32/drivers/iop_fw_load.c -+++ b/arch/cris/arch-v32/drivers/iop_fw_load.c -@@ -24,12 +24,12 @@ - #error "Please contact <greg@kroah.com> for details on how to fix it properly." - - static struct device iop_spu_device[2] = { -- { .bus_id = "iop-spu0", }, -- { .bus_id = "iop-spu1", }, -+ { .init_name = "iop-spu0", }, -+ { .init_name = "iop-spu1", }, - }; - - static struct device iop_mpu_device = { -- .bus_id = "iop-mpu", -+ .init_name = "iop-mpu", - }; - - static int wait_mpu_idle(void) diff --git a/driver-core/bus_id-firmware.patch b/driver-core/bus_id-firmware.patch deleted file mode 100644 index 4700f498d0dc95..00000000000000 --- a/driver-core/bus_id-firmware.patch +++ /dev/null @@ -1,21 +0,0 @@ -From: Kay Sievers <kay.sievers@vrfy.org> -Subject: dmi: struct device - replace bus_id with dev_name(), dev_set_name() - -CC: Lennart Poettering <mzxreary@0pointer.de> -Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> ---- - drivers/firmware/dmi-id.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/firmware/dmi-id.c -+++ b/drivers/firmware/dmi-id.c -@@ -223,7 +223,7 @@ static int __init dmi_id_init(void) - } - - dmi_dev->class = &dmi_class; -- strcpy(dmi_dev->bus_id, "id"); -+ dev_set_name(dmi_dev, "id"); - dmi_dev->groups = sys_dmi_attribute_groups; - - ret = device_register(dmi_dev); diff --git a/driver-core/bus_id-gadget.patch b/driver-core/bus_id-gadget.patch deleted file mode 100644 index abf3d2be0aa4bd..00000000000000 --- a/driver-core/bus_id-gadget.patch +++ /dev/null @@ -1,92 +0,0 @@ -From: Kay Sievers <kay.sievers@vrfy.org> -Subject: gadget: struct device - replace bus_id with dev_name(), dev_set_name() - -Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> ---- - drivers/usb/gadget/at91_udc.c | 2 +- - drivers/usb/gadget/atmel_usba_udc.c | 2 +- - drivers/usb/gadget/fsl_qe_udc.c | 2 +- - drivers/usb/gadget/lh7a40x_udc.c | 2 +- - drivers/usb/gadget/pxa25x_udc.c | 2 +- - drivers/usb/gadget/pxa27x_udc.c | 2 +- - drivers/usb/gadget/s3c2410_udc.c | 2 +- - 7 files changed, 7 insertions(+), 7 deletions(-) - ---- a/drivers/usb/gadget/at91_udc.c -+++ b/drivers/usb/gadget/at91_udc.c -@@ -1474,7 +1474,7 @@ static struct at91_udc controller = { - .ep0 = &controller.ep[0].ep, - .name = driver_name, - .dev = { -- .bus_id = "gadget", -+ .init_name = "gadget", - .release = nop_release, - } - }, ---- a/drivers/usb/gadget/atmel_usba_udc.c -+++ b/drivers/usb/gadget/atmel_usba_udc.c -@@ -1034,7 +1034,7 @@ static struct usba_udc the_udc = { - .is_dualspeed = 1, - .name = "atmel_usba_udc", - .dev = { -- .bus_id = "gadget", -+ .init_name = "gadget", - .release = nop_release, - }, - }, ---- a/drivers/usb/gadget/fsl_qe_udc.c -+++ b/drivers/usb/gadget/fsl_qe_udc.c -@@ -2545,7 +2545,7 @@ static int __devinit qe_udc_probe(struct - - device_initialize(&udc_controller->gadget.dev); - -- strcpy(udc_controller->gadget.dev.bus_id, "gadget"); -+ dev_set_name(&udc_controller->gadget.dev, "gadget"); - - udc_controller->gadget.dev.release = qe_udc_release; - udc_controller->gadget.dev.parent = &ofdev->dev; ---- a/drivers/usb/gadget/lh7a40x_udc.c -+++ b/drivers/usb/gadget/lh7a40x_udc.c -@@ -1981,7 +1981,7 @@ static struct lh7a40x_udc memory = { - .ep0 = &memory.ep[0].ep, - .name = driver_name, - .dev = { -- .bus_id = "gadget", -+ .init_name = "gadget", - .release = nop_release, - }, - }, ---- a/drivers/usb/gadget/pxa25x_udc.c -+++ b/drivers/usb/gadget/pxa25x_udc.c -@@ -1833,7 +1833,7 @@ static struct pxa25x_udc memory = { - .ep0 = &memory.ep[0].ep, - .name = driver_name, - .dev = { -- .bus_id = "gadget", -+ .init_name = "gadget", - .release = nop_release, - }, - }, ---- a/drivers/usb/gadget/pxa27x_udc.c -+++ b/drivers/usb/gadget/pxa27x_udc.c -@@ -2162,7 +2162,7 @@ static struct pxa_udc memory = { - .ep0 = &memory.udc_usb_ep[0].usb_ep, - .name = driver_name, - .dev = { -- .bus_id = "gadget", -+ .init_name = "gadget", - }, - }, - ---- a/drivers/usb/gadget/s3c2410_udc.c -+++ b/drivers/usb/gadget/s3c2410_udc.c -@@ -1727,7 +1727,7 @@ static struct s3c2410_udc memory = { - .ep0 = &memory.ep[0].ep, - .name = gadget_name, - .dev = { -- .bus_id = "gadget", -+ .init_name = "gadget", - }, - }, - diff --git a/driver-core/bus_id-gpio.patch b/driver-core/bus_id-gpio.patch deleted file mode 100644 index e84321cd61d8ca..00000000000000 --- a/driver-core/bus_id-gpio.patch +++ /dev/null @@ -1,20 +0,0 @@ -From: Kay Sievers <kay.sievers@vrfy.org> -Subject: gpio: struct device - replace bus_id with dev_name(), dev_set_name() - -Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> ---- - drivers/gpio/gpiolib.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/gpio/gpiolib.c -+++ b/drivers/gpio/gpiolib.c -@@ -1213,7 +1213,7 @@ static int gpiolib_show(struct seq_file - if (dev) - seq_printf(s, ", %s/%s", - dev->bus ? dev->bus->name : "no-bus", -- dev->bus_id); -+ dev_name(dev)); - if (chip->label) - seq_printf(s, ", %s", chip->label); - if (chip->can_sleep) diff --git a/driver-core/bus_id-gpu.patch b/driver-core/bus_id-gpu.patch deleted file mode 100644 index e2cb89ca4a53ed..00000000000000 --- a/driver-core/bus_id-gpu.patch +++ /dev/null @@ -1,21 +0,0 @@ -From: Kay Sievers <kay.sievers@vrfy.org> -Subject: gpu: struct device - replace bus_id with dev_name(), dev_set_name() - -CC: Dave Airlie <airlied@redhat.com> -Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> ---- - drivers/gpu/drm/drm_sysfs.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/gpu/drm/drm_sysfs.c -+++ b/drivers/gpu/drm/drm_sysfs.c -@@ -488,7 +488,7 @@ int drm_sysfs_device_add(struct drm_mino - else - minor_str = "card%d"; - -- snprintf(minor->kdev.bus_id, BUS_ID_SIZE, minor_str, minor->index); -+ dev_set_name(&minor->kdev, minor_str, minor->index); - - err = device_register(&minor->kdev); - if (err) { diff --git a/driver-core/bus_id-hwmon.patch b/driver-core/bus_id-hwmon.patch deleted file mode 100644 index 6b612de176ac00..00000000000000 --- a/driver-core/bus_id-hwmon.patch +++ /dev/null @@ -1,32 +0,0 @@ -From: Kay Sievers <kay.sievers@vrfy.org> -Subject: hwmon: struct device - replace bus_id with dev_name(), dev_set_name() - -Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> ---- - drivers/hwmon/hwmon.c | 2 +- - drivers/hwmon/lm75.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - ---- a/drivers/hwmon/hwmon.c -+++ b/drivers/hwmon/hwmon.c -@@ -76,7 +76,7 @@ void hwmon_device_unregister(struct devi - { - int id; - -- if (likely(sscanf(dev->bus_id, HWMON_ID_FORMAT, &id) == 1)) { -+ if (likely(sscanf(dev_name(dev), HWMON_ID_FORMAT, &id) == 1)) { - device_unregister(dev); - spin_lock(&idr_lock); - idr_remove(&hwmon_idr, id); ---- a/drivers/hwmon/lm75.c -+++ b/drivers/hwmon/lm75.c -@@ -190,7 +190,7 @@ lm75_probe(struct i2c_client *client, co - } - - dev_info(&client->dev, "%s: sensor '%s'\n", -- data->hwmon_dev->bus_id, client->name); -+ dev_name(data->hwmon_dev), client->name); - - return 0; - diff --git a/driver-core/bus_id-i2o.patch b/driver-core/bus_id-i2o.patch deleted file mode 100644 index 06133889ad4d27..00000000000000 --- a/driver-core/bus_id-i2o.patch +++ /dev/null @@ -1,64 +0,0 @@ -From: Kay Sievers <kay.sievers@vrfy.org> -Subject: i2o: struct device - replace bus_id with dev_name(), dev_set_name() - -Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> ---- - drivers/message/i2o/device.c | 8 ++++---- - drivers/message/i2o/i2o_proc.c | 2 +- - drivers/message/i2o/iop.c | 2 +- - 3 files changed, 6 insertions(+), 6 deletions(-) - ---- a/drivers/message/i2o/device.c -+++ b/drivers/message/i2o/device.c -@@ -134,7 +134,7 @@ static void i2o_device_release(struct de - { - struct i2o_device *i2o_dev = to_i2o_device(dev); - -- pr_debug("i2o: device %s released\n", dev->bus_id); -+ pr_debug("i2o: device %s released\n", dev_name(dev)); - - kfree(i2o_dev); - } -@@ -229,8 +229,8 @@ static int i2o_device_add(struct i2o_con - - i2o_dev->lct_data = *entry; - -- snprintf(i2o_dev->device.bus_id, BUS_ID_SIZE, "%d:%03x", c->unit, -- i2o_dev->lct_data.tid); -+ dev_set_name(&i2o_dev->device, "%d:%03x", c->unit, -+ i2o_dev->lct_data.tid); - - i2o_dev->iop = c; - i2o_dev->device.parent = &c->device; -@@ -281,7 +281,7 @@ static int i2o_device_add(struct i2o_con - - i2o_driver_notify_device_add_all(i2o_dev); - -- pr_debug("i2o: device %s added\n", i2o_dev->device.bus_id); -+ pr_debug("i2o: device %s added\n", dev_name(&i2o_dev->device)); - - return 0; - ---- a/drivers/message/i2o/i2o_proc.c -+++ b/drivers/message/i2o/i2o_proc.c -@@ -1300,7 +1300,7 @@ static int i2o_seq_show_dev_name(struct - { - struct i2o_device *d = (struct i2o_device *)seq->private; - -- seq_printf(seq, "%s\n", d->device.bus_id); -+ seq_printf(seq, "%s\n", dev_name(&d->device)); - - return 0; - } ---- a/drivers/message/i2o/iop.c -+++ b/drivers/message/i2o/iop.c -@@ -1072,7 +1072,7 @@ struct i2o_controller *i2o_iop_alloc(voi - - c->device.release = &i2o_iop_release; - -- snprintf(c->device.bus_id, BUS_ID_SIZE, "iop%d", c->unit); -+ dev_set_name(&c->device, "iop%d", c->unit); - - #if BITS_PER_LONG == 64 - spin_lock_init(&c->context_list_lock); diff --git a/driver-core/bus_id-ia64.patch b/driver-core/bus_id-ia64.patch deleted file mode 100644 index 2d174bba76b1f8..00000000000000 --- a/driver-core/bus_id-ia64.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: Kay Sievers <kay.sievers@vrfy.org> -Subject: IA64: struct device - replace bus_id with dev_name(), dev_set_name() - -Cc: Tony Luck <tony.luck@intel.com> -Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> ---- - arch/ia64/kernel/pci-dma.c | 2 +- - arch/ia64/sn/kernel/tiocx.c | 3 +-- - 2 files changed, 2 insertions(+), 3 deletions(-) - ---- a/arch/ia64/kernel/pci-dma.c -+++ b/arch/ia64/kernel/pci-dma.c -@@ -39,7 +39,7 @@ int iommu_detected __read_mostly; - be probably a smaller DMA mask, but this is bug-to-bug compatible - to i386. */ - struct device fallback_dev = { -- .bus_id = "fallback device", -+ .init_name = "fallback device", - .coherent_dma_mask = DMA_32BIT_MASK, - .dma_mask = &fallback_dev.coherent_dma_mask, - }; ---- a/arch/ia64/sn/kernel/tiocx.c -+++ b/arch/ia64/sn/kernel/tiocx.c -@@ -206,8 +206,7 @@ cx_device_register(nasid_t nasid, int pa - cx_dev->dev.parent = NULL; - cx_dev->dev.bus = &tiocx_bus_type; - cx_dev->dev.release = tiocx_bus_release; -- snprintf(cx_dev->dev.bus_id, BUS_ID_SIZE, "%d", -- cx_dev->cx_id.nasid); -+ dev_set_name(&cx_dev->dev, "%d", cx_dev->cx_id.nasid); - device_register(&cx_dev->dev); - get_device(&cx_dev->dev); - diff --git a/driver-core/bus_id-idle.patch b/driver-core/bus_id-idle.patch deleted file mode 100644 index 57eabb2b790279..00000000000000 --- a/driver-core/bus_id-idle.patch +++ /dev/null @@ -1,21 +0,0 @@ -From: Kay Sievers <kay.sievers@vrfy.org> -Subject: i7300_idle: struct device - replace bus_id with dev_name(), dev_set_name() - -CC: Andy Henroid <andrew.d.henroid@intel.com> -Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> ---- - drivers/idle/i7300_idle.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/idle/i7300_idle.c -+++ b/drivers/idle/i7300_idle.c -@@ -177,7 +177,7 @@ static int __init i7300_idle_ioat_selfte - } - - static struct device dummy_dma_dev = { -- .bus_id = "fallback device", -+ .init_name = "fallback device", - .coherent_dma_mask = DMA_64BIT_MASK, - .dma_mask = &dummy_dma_dev.coherent_dma_mask, - }; diff --git a/driver-core/bus_id-infiniband.patch b/driver-core/bus_id-infiniband.patch deleted file mode 100644 index a93b517972b1f8..00000000000000 --- a/driver-core/bus_id-infiniband.patch +++ /dev/null @@ -1,47 +0,0 @@ -From: Kay Sievers <kay.sievers@vrfy.org> -Subject: infiniband: struct device - replace bus_id with dev_name(), dev_set_name() - -Acked-by: Roland Dreier <rolandd@cisco.com> -Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> ---- - drivers/infiniband/core/sysfs.c | 2 +- - drivers/infiniband/core/ucm.c | 3 +-- - drivers/infiniband/ulp/srp/ib_srp.c | 3 +-- - 3 files changed, 3 insertions(+), 5 deletions(-) - ---- a/drivers/infiniband/core/sysfs.c -+++ b/drivers/infiniband/core/sysfs.c -@@ -778,7 +778,7 @@ int ib_device_register_sysfs(struct ib_d - class_dev->class = &ib_class; - class_dev->driver_data = device; - class_dev->parent = device->dma_device; -- strlcpy(class_dev->bus_id, device->name, BUS_ID_SIZE); -+ dev_set_name(class_dev, device->name); - - INIT_LIST_HEAD(&device->port_list); - ---- a/drivers/infiniband/core/ucm.c -+++ b/drivers/infiniband/core/ucm.c -@@ -1266,8 +1266,7 @@ static void ib_ucm_add_one(struct ib_dev - ucm_dev->dev.parent = device->dma_device; - ucm_dev->dev.devt = ucm_dev->cdev.dev; - ucm_dev->dev.release = ib_ucm_release_dev; -- snprintf(ucm_dev->dev.bus_id, BUS_ID_SIZE, "ucm%d", -- ucm_dev->devnum); -+ dev_set_name(&ucm_dev->dev, "ucm%d", ucm_dev->devnum); - if (device_register(&ucm_dev->dev)) - goto err_cdev; - ---- a/drivers/infiniband/ulp/srp/ib_srp.c -+++ b/drivers/infiniband/ulp/srp/ib_srp.c -@@ -1949,8 +1949,7 @@ static struct srp_host *srp_add_port(str - - host->dev.class = &srp_class; - host->dev.parent = device->dev->dma_device; -- snprintf(host->dev.bus_id, BUS_ID_SIZE, "srp-%s-%d", -- device->dev->name, port); -+ dev_set_name(&host->dev, "srp-%s-%d", device->dev->name, port); - - if (device_register(&host->dev)) - goto free_host; diff --git a/driver-core/bus_id-isdn.patch b/driver-core/bus_id-isdn.patch deleted file mode 100644 index 0291f463e7ca2b..00000000000000 --- a/driver-core/bus_id-isdn.patch +++ /dev/null @@ -1,21 +0,0 @@ -From: Kay Sievers <kay.sievers@vrfy.org> -Subject: ISDN: struct device - replace bus_id with dev_name(), dev_set_name() - -CC: Karsten Keil <kkeil@suse.de> -Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> ---- - drivers/isdn/mISDN/dsp_pipeline.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/isdn/mISDN/dsp_pipeline.c -+++ b/drivers/isdn/mISDN/dsp_pipeline.c -@@ -91,7 +91,7 @@ int mISDN_dsp_element_register(struct mI - - entry->dev.class = elements_class; - dev_set_drvdata(&entry->dev, elem); -- snprintf(entry->dev.bus_id, BUS_ID_SIZE, elem->name); -+ dev_set_name(&entry->dev, elem->name); - ret = device_register(&entry->dev); - if (ret) { - printk(KERN_ERR "%s: failed to register %s\n", diff --git a/driver-core/bus_id-kernel-power.patch b/driver-core/bus_id-kernel-power.patch deleted file mode 100644 index a0d5ff31fcf198..00000000000000 --- a/driver-core/bus_id-kernel-power.patch +++ /dev/null @@ -1,38 +0,0 @@ -From: Kay Sievers <kay.sievers@vrfy.org> -Subject: pm: struct device - replace bus_id with dev_name(), dev_set_name() - -Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> ---- - kernel/power/main.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - ---- a/kernel/power/main.c -+++ b/kernel/power/main.c -@@ -615,7 +615,7 @@ static void __init test_wakealarm(struct - /* this may fail if the RTC hasn't been initialized */ - status = rtc_read_time(rtc, &alm.time); - if (status < 0) { -- printk(err_readtime, rtc->dev.bus_id, status); -+ printk(err_readtime, dev_name(&rtc->dev), status); - return; - } - rtc_tm_to_time(&alm.time, &now); -@@ -626,7 +626,7 @@ static void __init test_wakealarm(struct - - status = rtc_set_alarm(rtc, &alm); - if (status < 0) { -- printk(err_wakealarm, rtc->dev.bus_id, status); -+ printk(err_wakealarm, dev_name(&rtc->dev), status); - return; - } - -@@ -660,7 +660,7 @@ static int __init has_wakealarm(struct d - if (!device_may_wakeup(candidate->dev.parent)) - return 0; - -- *(char **)name_ptr = dev->bus_id; -+ *(const char **)name_ptr = dev_name(dev); - return 1; - } - diff --git a/driver-core/bus_id-macintosh.patch b/driver-core/bus_id-macintosh.patch deleted file mode 100644 index eb074fb3ff5d18..00000000000000 --- a/driver-core/bus_id-macintosh.patch +++ /dev/null @@ -1,98 +0,0 @@ -From: Kay Sievers <kay.sievers@vrfy.org> -Subject: macintosh: struct device - replace bus_id with dev_name(), dev_set_name() - -Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> ---- - drivers/macintosh/macio_asic.c | 24 ++++++++++++------------ - 1 file changed, 12 insertions(+), 12 deletions(-) - ---- a/drivers/macintosh/macio_asic.c -+++ b/drivers/macintosh/macio_asic.c -@@ -33,7 +33,7 @@ - - #undef DEBUG - --#define MAX_NODE_NAME_SIZE (BUS_ID_SIZE - 12) -+#define MAX_NODE_NAME_SIZE (20 - 12) - - static struct macio_chip *macio_on_hold; - -@@ -240,7 +240,7 @@ static void macio_create_fixup_irq(struc - if (irq != NO_IRQ) { - dev->interrupt[index].start = irq; - dev->interrupt[index].flags = IORESOURCE_IRQ; -- dev->interrupt[index].name = dev->ofdev.dev.bus_id; -+ dev->interrupt[index].name = dev_name(&dev->ofdev.dev); - } - if (dev->n_interrupts <= index) - dev->n_interrupts = index + 1; -@@ -303,7 +303,7 @@ static void macio_setup_interrupts(struc - break; - res->start = irq; - res->flags = IORESOURCE_IRQ; -- res->name = dev->ofdev.dev.bus_id; -+ res->name = dev_name(&dev->ofdev.dev); - if (macio_resource_quirks(np, res, i - 1)) { - memset(res, 0, sizeof(struct resource)); - continue; -@@ -325,7 +325,7 @@ static void macio_setup_resources(struct - if (index >= MACIO_DEV_COUNT_RESOURCES) - break; - *res = r; -- res->name = dev->ofdev.dev.bus_id; -+ res->name = dev_name(&dev->ofdev.dev); - - if (macio_resource_quirks(np, res, index)) { - memset(res, 0, sizeof(struct resource)); -@@ -338,7 +338,7 @@ static void macio_setup_resources(struct - if (insert_resource(parent_res, res)) { - printk(KERN_WARNING "Can't request resource " - "%d for MacIO device %s\n", -- index, dev->ofdev.dev.bus_id); -+ index, dev_name(&dev->ofdev.dev)); - } - } - dev->n_resources = index; -@@ -385,8 +385,8 @@ static struct macio_dev * macio_add_one_ - - /* MacIO itself has a different reg, we use it's PCI base */ - if (np == chip->of_node) { -- sprintf(dev->ofdev.dev.bus_id, "%1d.%08x:%.*s", -- chip->lbus.index, -+ dev_set_name(&dev->ofdev.dev, "%1d.%08x:%.*s", -+ chip->lbus.index, - #ifdef CONFIG_PCI - (unsigned int)pci_resource_start(chip->lbus.pdev, 0), - #else -@@ -395,9 +395,9 @@ static struct macio_dev * macio_add_one_ - MAX_NODE_NAME_SIZE, np->name); - } else { - reg = of_get_property(np, "reg", NULL); -- sprintf(dev->ofdev.dev.bus_id, "%1d.%08x:%.*s", -- chip->lbus.index, -- reg ? *reg : 0, MAX_NODE_NAME_SIZE, np->name); -+ dev_set_name(&dev->ofdev.dev, "%1d.%08x:%.*s", -+ chip->lbus.index, -+ reg ? *reg : 0, MAX_NODE_NAME_SIZE, np->name); - } - - /* Setup interrupts & resources */ -@@ -408,7 +408,7 @@ static struct macio_dev * macio_add_one_ - /* Register with core */ - if (of_device_register(&dev->ofdev) != 0) { - printk(KERN_DEBUG"macio: device registration error for %s!\n", -- dev->ofdev.dev.bus_id); -+ dev_name(&dev->ofdev.dev)); - kfree(dev); - return NULL; - } -@@ -558,7 +558,7 @@ err_out: - resource_no, - macio_resource_len(dev, resource_no), - macio_resource_start(dev, resource_no), -- dev->ofdev.dev.bus_id); -+ dev_name(&dev->ofdev.dev)); - return -EBUSY; - } - diff --git a/driver-core/bus_id-memstick.patch b/driver-core/bus_id-memstick.patch deleted file mode 100644 index 304f3010b57308..00000000000000 --- a/driver-core/bus_id-memstick.patch +++ /dev/null @@ -1,112 +0,0 @@ -From: Kay Sievers <kay.sievers@vrfy.org> -Subject: memstick: struct device - replace bus_id with dev_name(), dev_set_name() - -Cc: Alex Dubov <oakad@yahoo.com> -Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> ---- - drivers/memstick/core/memstick.c | 5 ++--- - drivers/memstick/core/mspro_block.c | 14 +++++++------- - drivers/memstick/host/tifm_ms.c | 4 ++-- - 3 files changed, 11 insertions(+), 12 deletions(-) - ---- a/drivers/memstick/core/memstick.c -+++ b/drivers/memstick/core/memstick.c -@@ -385,8 +385,7 @@ static struct memstick_dev *memstick_all - - if (card) { - card->host = host; -- snprintf(card->dev.bus_id, sizeof(card->dev.bus_id), -- "%s", host->dev.bus_id); -+ dev_set_name(&card->dev, "%s", dev_name(&host->dev)); - card->dev.parent = &host->dev; - card->dev.bus = &memstick_bus_type; - card->dev.release = memstick_free_card; -@@ -519,7 +518,7 @@ int memstick_add_host(struct memstick_ho - if (rc) - return rc; - -- snprintf(host->dev.bus_id, BUS_ID_SIZE, "memstick%u", host->id); -+ dev_set_name(&host->dev, "memstick%u", host->id); - - rc = device_add(&host->dev); - if (rc) { ---- a/drivers/memstick/core/mspro_block.c -+++ b/drivers/memstick/core/mspro_block.c -@@ -887,14 +887,14 @@ try_again: - if (rc) { - printk(KERN_WARNING - "%s: could not switch to 4-bit mode, error %d\n", -- card->dev.bus_id, rc); -+ dev_name(&card->dev), rc); - return 0; - } - - msb->system = MEMSTICK_SYS_PAR4; - host->set_param(host, MEMSTICK_INTERFACE, MEMSTICK_PAR4); - printk(KERN_INFO "%s: switching to 4-bit parallel mode\n", -- card->dev.bus_id); -+ dev_name(&card->dev)); - - if (msb->caps & MEMSTICK_CAP_PAR8) { - rc = mspro_block_set_interface(card, MEMSTICK_SYS_PAR8); -@@ -905,11 +905,11 @@ try_again: - MEMSTICK_PAR8); - printk(KERN_INFO - "%s: switching to 8-bit parallel mode\n", -- card->dev.bus_id); -+ dev_name(&card->dev)); - } else - printk(KERN_WARNING - "%s: could not switch to 8-bit mode, error %d\n", -- card->dev.bus_id, rc); -+ dev_name(&card->dev), rc); - } - - card->next_request = h_mspro_block_req_init; -@@ -922,7 +922,7 @@ try_again: - if (rc) { - printk(KERN_WARNING - "%s: interface error, trying to fall back to serial\n", -- card->dev.bus_id); -+ dev_name(&card->dev)); - msb->system = MEMSTICK_SYS_SERIAL; - host->set_param(host, MEMSTICK_POWER, MEMSTICK_POWER_OFF); - msleep(10); -@@ -992,14 +992,14 @@ static int mspro_block_read_attributes(s - - if (be16_to_cpu(attr->signature) != MSPRO_BLOCK_SIGNATURE) { - printk(KERN_ERR "%s: unrecognized device signature %x\n", -- card->dev.bus_id, be16_to_cpu(attr->signature)); -+ dev_name(&card->dev), be16_to_cpu(attr->signature)); - rc = -ENODEV; - goto out_free_attr; - } - - if (attr->count > MSPRO_BLOCK_MAX_ATTRIBUTES) { - printk(KERN_WARNING "%s: way too many attribute entries\n", -- card->dev.bus_id); -+ dev_name(&card->dev)); - attr_count = MSPRO_BLOCK_MAX_ATTRIBUTES; - } else - attr_count = attr->count; ---- a/drivers/memstick/host/tifm_ms.c -+++ b/drivers/memstick/host/tifm_ms.c -@@ -546,7 +546,7 @@ static void tifm_ms_abort(unsigned long - printk(KERN_ERR - "%s : card failed to respond for a long period of time " - "(%x, %x)\n", -- host->dev->dev.bus_id, host->req ? host->req->tpc : 0, -+ dev_name(&host->dev->dev), host->req ? host->req->tpc : 0, - host->cmd_flags); - - tifm_eject(host->dev); -@@ -561,7 +561,7 @@ static int tifm_ms_probe(struct tifm_dev - if (!(TIFM_SOCK_STATE_OCCUPIED - & readl(sock->addr + SOCK_PRESENT_STATE))) { - printk(KERN_WARNING "%s : card gone, unexpectedly\n", -- sock->dev.bus_id); -+ dev_name(&sock->dev)); - return rc; - } - diff --git a/driver-core/bus_id-mips.patch b/driver-core/bus_id-mips.patch deleted file mode 100644 index 145be996e44db3..00000000000000 --- a/driver-core/bus_id-mips.patch +++ /dev/null @@ -1,21 +0,0 @@ -From: Kay Sievers <kay.sievers@vrfy.org> -Subject: mips: struct device - replace bus_id with dev_name(), dev_set_name() - -Cc: Ralf Baechle <ralf@linux-mips.org> -Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> ---- - arch/mips/kernel/vpe.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/arch/mips/kernel/vpe.c -+++ b/arch/mips/kernel/vpe.c -@@ -1454,7 +1454,7 @@ static int __init vpe_module_init(void) - device_initialize(&vpe_device); - vpe_device.class = &vpe_class, - vpe_device.parent = NULL, -- strlcpy(vpe_device.bus_id, "vpe1", BUS_ID_SIZE); -+ dev_set_name(&vpe_device, "vpe1"); - vpe_device.devt = MKDEV(major, minor); - err = device_add(&vpe_device); - if (err) { diff --git a/driver-core/bus_id-mtd.patch b/driver-core/bus_id-mtd.patch deleted file mode 100644 index ca65a6606e3a5f..00000000000000 --- a/driver-core/bus_id-mtd.patch +++ /dev/null @@ -1,442 +0,0 @@ -From: Kay Sievers <kay.sievers@vrfy.org> -Subject: mtd: struct device - replace bus_id with dev_name(), dev_set_name() - -CC: David Woodhouse <dwmw2@infradead.org> -Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> ---- - drivers/mtd/devices/m25p80.c | 16 ++++++++-------- - drivers/mtd/devices/mtd_dataflash.c | 30 +++++++++++++++--------------- - drivers/mtd/maps/integrator-flash.c | 2 +- - drivers/mtd/maps/ixp2000.c | 4 ++-- - drivers/mtd/maps/ixp4xx.c | 2 +- - drivers/mtd/maps/omap_nor.c | 2 +- - drivers/mtd/maps/physmap.c | 6 +++--- - drivers/mtd/maps/physmap_of.c | 4 ++-- - drivers/mtd/mtdconcat.c | 2 +- - drivers/mtd/nand/fsl_upm.c | 2 +- - drivers/mtd/nand/plat_nand.c | 2 +- - drivers/mtd/nand/tmio_nand.c | 2 +- - drivers/mtd/onenand/generic.c | 2 +- - drivers/mtd/onenand/omap2.c | 2 +- - drivers/mtd/ubi/build.c | 2 +- - drivers/mtd/ubi/vmt.c | 4 ++-- - include/linux/mtd/concat.h | 2 +- - 17 files changed, 43 insertions(+), 43 deletions(-) - ---- a/drivers/mtd/devices/m25p80.c -+++ b/drivers/mtd/devices/m25p80.c -@@ -170,7 +170,7 @@ static int wait_till_ready(struct m25p * - static int erase_chip(struct m25p *flash) - { - DEBUG(MTD_DEBUG_LEVEL3, "%s: %s %dKiB\n", -- flash->spi->dev.bus_id, __func__, -+ dev_name(&flash->spi->dev), __func__, - flash->mtd.size / 1024); - - /* Wait until finished previous write command. */ -@@ -197,7 +197,7 @@ static int erase_chip(struct m25p *flash - static int erase_sector(struct m25p *flash, u32 offset) - { - DEBUG(MTD_DEBUG_LEVEL3, "%s: %s %dKiB at 0x%08x\n", -- flash->spi->dev.bus_id, __func__, -+ dev_name(&flash->spi->dev), __func__, - flash->mtd.erasesize / 1024, offset); - - /* Wait until finished previous write command. */ -@@ -234,7 +234,7 @@ static int m25p80_erase(struct mtd_info - u32 addr,len; - - DEBUG(MTD_DEBUG_LEVEL2, "%s: %s %s 0x%08x, len %d\n", -- flash->spi->dev.bus_id, __func__, "at", -+ dev_name(&flash->spi->dev), __func__, "at", - (u32)instr->addr, instr->len); - - /* sanity checks */ -@@ -295,7 +295,7 @@ static int m25p80_read(struct mtd_info * - struct spi_message m; - - DEBUG(MTD_DEBUG_LEVEL2, "%s: %s %s 0x%08x, len %zd\n", -- flash->spi->dev.bus_id, __func__, "from", -+ dev_name(&flash->spi->dev), __func__, "from", - (u32)from, len); - - /* sanity checks */ -@@ -367,7 +367,7 @@ static int m25p80_write(struct mtd_info - struct spi_message m; - - DEBUG(MTD_DEBUG_LEVEL2, "%s: %s %s 0x%08x, len %zd\n", -- flash->spi->dev.bus_id, __func__, "to", -+ dev_name(&flash->spi->dev), __func__, "to", - (u32)to, len); - - if (retlen) -@@ -563,7 +563,7 @@ static struct flash_info *__devinit jede - tmp = spi_write_then_read(spi, &code, 1, id, 5); - if (tmp < 0) { - DEBUG(MTD_DEBUG_LEVEL0, "%s: error %d reading JEDEC ID\n", -- spi->dev.bus_id, tmp); -+ dev_name(&spi->dev), tmp); - return NULL; - } - jedec = id[0]; -@@ -617,7 +617,7 @@ static int __devinit m25p_probe(struct s - /* unrecognized chip? */ - if (i == ARRAY_SIZE(m25p_data)) { - DEBUG(MTD_DEBUG_LEVEL0, "%s: unrecognized id %s\n", -- spi->dev.bus_id, data->type); -+ dev_name(&spi->dev), data->type); - info = NULL; - - /* recognized; is that chip really what's there? */ -@@ -658,7 +658,7 @@ static int __devinit m25p_probe(struct s - if (data && data->name) - flash->mtd.name = data->name; - else -- flash->mtd.name = spi->dev.bus_id; -+ flash->mtd.name = dev_name(&spi->dev); - - flash->mtd.type = MTD_NORFLASH; - flash->mtd.writesize = 1; ---- a/drivers/mtd/devices/mtd_dataflash.c -+++ b/drivers/mtd/devices/mtd_dataflash.c -@@ -128,7 +128,7 @@ static int dataflash_waitready(struct sp - status = dataflash_status(spi); - if (status < 0) { - DEBUG(MTD_DEBUG_LEVEL1, "%s: status %d?\n", -- spi->dev.bus_id, status); -+ dev_name(&spi->dev), status); - status = 0; - } - -@@ -154,7 +154,7 @@ static int dataflash_erase(struct mtd_in - uint8_t *command; - - DEBUG(MTD_DEBUG_LEVEL2, "%s: erase addr=0x%x len 0x%x\n", -- spi->dev.bus_id, -+ dev_name(&spi->dev), - instr->addr, instr->len); - - /* Sanity checks */ -@@ -197,7 +197,7 @@ static int dataflash_erase(struct mtd_in - - if (status < 0) { - printk(KERN_ERR "%s: erase %x, err %d\n", -- spi->dev.bus_id, pageaddr, status); -+ dev_name(&spi->dev), pageaddr, status); - /* REVISIT: can retry instr->retries times; or - * giveup and instr->fail_addr = instr->addr; - */ -@@ -239,7 +239,7 @@ static int dataflash_read(struct mtd_inf - int status; - - DEBUG(MTD_DEBUG_LEVEL2, "%s: read 0x%x..0x%x\n", -- priv->spi->dev.bus_id, (unsigned)from, (unsigned)(from + len)); -+ dev_name(&priv->spi->dev), (unsigned)from, (unsigned)(from + len)); - - *retlen = 0; - -@@ -288,7 +288,7 @@ static int dataflash_read(struct mtd_inf - status = 0; - } else - DEBUG(MTD_DEBUG_LEVEL1, "%s: read %x..%x --> %d\n", -- priv->spi->dev.bus_id, -+ dev_name(&priv->spi->dev), - (unsigned)from, (unsigned)(from + len), - status); - return status; -@@ -315,7 +315,7 @@ static int dataflash_write(struct mtd_in - uint8_t *command; - - DEBUG(MTD_DEBUG_LEVEL2, "%s: write 0x%x..0x%x\n", -- spi->dev.bus_id, (unsigned)to, (unsigned)(to + len)); -+ dev_name(&spi->dev), (unsigned)to, (unsigned)(to + len)); - - *retlen = 0; - -@@ -374,7 +374,7 @@ static int dataflash_write(struct mtd_in - status = spi_sync(spi, &msg); - if (status < 0) - DEBUG(MTD_DEBUG_LEVEL1, "%s: xfer %u -> %d \n", -- spi->dev.bus_id, addr, status); -+ dev_name(&spi->dev), addr, status); - - (void) dataflash_waitready(priv->spi); - } -@@ -396,7 +396,7 @@ static int dataflash_write(struct mtd_in - spi_transfer_del(x + 1); - if (status < 0) - DEBUG(MTD_DEBUG_LEVEL1, "%s: pgm %u/%u -> %d \n", -- spi->dev.bus_id, addr, writelen, status); -+ dev_name(&spi->dev), addr, writelen, status); - - (void) dataflash_waitready(priv->spi); - -@@ -416,14 +416,14 @@ static int dataflash_write(struct mtd_in - status = spi_sync(spi, &msg); - if (status < 0) - DEBUG(MTD_DEBUG_LEVEL1, "%s: compare %u -> %d \n", -- spi->dev.bus_id, addr, status); -+ dev_name(&spi->dev), addr, status); - - status = dataflash_waitready(priv->spi); - - /* Check result of the compare operation */ - if (status & (1 << 6)) { - printk(KERN_ERR "%s: compare page %u, err %d\n", -- spi->dev.bus_id, pageaddr, status); -+ dev_name(&spi->dev), pageaddr, status); - remaining = 0; - status = -EIO; - break; -@@ -779,7 +779,7 @@ static struct flash_info *__devinit jede - tmp = spi_write_then_read(spi, &code, 1, id, 3); - if (tmp < 0) { - DEBUG(MTD_DEBUG_LEVEL0, "%s: error %d reading JEDEC ID\n", -- spi->dev.bus_id, tmp); -+ dev_name(&spi->dev), tmp); - return ERR_PTR(tmp); - } - if (id[0] != 0x1f) -@@ -869,7 +869,7 @@ static int __devinit dataflash_probe(str - status = dataflash_status(spi); - if (status <= 0 || status == 0xff) { - DEBUG(MTD_DEBUG_LEVEL1, "%s: status error %d\n", -- spi->dev.bus_id, status); -+ dev_name(&spi->dev), status); - if (status == 0 || status == 0xff) - status = -ENODEV; - return status; -@@ -905,13 +905,13 @@ static int __devinit dataflash_probe(str - /* obsolete AT45DB1282 not (yet?) supported */ - default: - DEBUG(MTD_DEBUG_LEVEL1, "%s: unsupported device (%x)\n", -- spi->dev.bus_id, status & 0x3c); -+ dev_name(&spi->dev), status & 0x3c); - status = -ENODEV; - } - - if (status < 0) - DEBUG(MTD_DEBUG_LEVEL1, "%s: add_dataflash --> %d\n", -- spi->dev.bus_id, status); -+ dev_name(&spi->dev), status); - - return status; - } -@@ -921,7 +921,7 @@ static int __devexit dataflash_remove(st - struct dataflash *flash = dev_get_drvdata(&spi->dev); - int status; - -- DEBUG(MTD_DEBUG_LEVEL1, "%s: remove\n", spi->dev.bus_id); -+ DEBUG(MTD_DEBUG_LEVEL1, "%s: remove\n", dev_name(&spi->dev)); - - if (mtd_has_partitions() && flash->partitioned) - status = del_mtd_partitions(&flash->mtd); ---- a/drivers/mtd/maps/integrator-flash.c -+++ b/drivers/mtd/maps/integrator-flash.c -@@ -105,7 +105,7 @@ static int armflash_probe(struct platfor - info->map.bankwidth = plat->width; - info->map.phys = res->start; - info->map.virt = base; -- info->map.name = dev->dev.bus_id; -+ info->map.name = dev_name(&dev->dev); - info->map.set_vpp = armflash_set_vpp; - - simple_map_init(&info->map); ---- a/drivers/mtd/maps/ixp2000.c -+++ b/drivers/mtd/maps/ixp2000.c -@@ -188,7 +188,7 @@ static int ixp2000_flash_probe(struct pl - */ - info->map.map_priv_2 = (unsigned long) ixp_data->bank_setup; - -- info->map.name = dev->dev.bus_id; -+ info->map.name = dev_name(&dev->dev); - info->map.read = ixp2000_flash_read8; - info->map.write = ixp2000_flash_write8; - info->map.copy_from = ixp2000_flash_copy_from; -@@ -196,7 +196,7 @@ static int ixp2000_flash_probe(struct pl - - info->res = request_mem_region(dev->resource->start, - dev->resource->end - dev->resource->start + 1, -- dev->dev.bus_id); -+ dev_name(&dev->dev)); - if (!info->res) { - dev_err(&dev->dev, "Could not reserve memory region\n"); - err = -ENOMEM; ---- a/drivers/mtd/maps/ixp4xx.c -+++ b/drivers/mtd/maps/ixp4xx.c -@@ -218,7 +218,7 @@ static int ixp4xx_flash_probe(struct pla - * handle that. - */ - info->map.bankwidth = 2; -- info->map.name = dev->dev.bus_id; -+ info->map.name = dev_name(&dev->dev); - info->map.read = ixp4xx_read16, - info->map.write = ixp4xx_probe_write16, - info->map.copy_from = ixp4xx_copy_from, ---- a/drivers/mtd/maps/omap_nor.c -+++ b/drivers/mtd/maps/omap_nor.c -@@ -101,7 +101,7 @@ static int __init omapflash_probe(struct - err = -ENOMEM; - goto out_release_mem_region; - } -- info->map.name = pdev->dev.bus_id; -+ info->map.name = dev_name(&pdev->dev); - info->map.phys = res->start; - info->map.size = size; - info->map.bankwidth = pdata->width; ---- a/drivers/mtd/maps/physmap.c -+++ b/drivers/mtd/maps/physmap.c -@@ -108,13 +108,13 @@ static int physmap_flash_probe(struct pl - if (!devm_request_mem_region(&dev->dev, - dev->resource[i].start, - dev->resource[i].end - dev->resource[i].start + 1, -- dev->dev.bus_id)) { -+ dev_name(&dev->dev))) { - dev_err(&dev->dev, "Could not reserve memory region\n"); - err = -ENOMEM; - goto err_out; - } - -- info->map[i].name = dev->dev.bus_id; -+ info->map[i].name = dev_name(&dev->dev); - info->map[i].phys = dev->resource[i].start; - info->map[i].size = dev->resource[i].end - dev->resource[i].start + 1; - info->map[i].bankwidth = physmap_data->width; -@@ -150,7 +150,7 @@ static int physmap_flash_probe(struct pl - * We detected multiple devices. Concatenate them together. - */ - #ifdef CONFIG_MTD_CONCAT -- info->cmtd = mtd_concat_create(info->mtd, devices_found, dev->dev.bus_id); -+ info->cmtd = mtd_concat_create(info->mtd, devices_found, dev_name(&dev->dev)); - if (info->cmtd == NULL) - err = -ENXIO; - #else ---- a/drivers/mtd/maps/physmap_of.c -+++ b/drivers/mtd/maps/physmap_of.c -@@ -183,7 +183,7 @@ static int __devinit of_flash_probe(stru - - err = -EBUSY; - info->res = request_mem_region(res.start, res.end - res.start + 1, -- dev->dev.bus_id); -+ dev_name(&dev->dev)); - if (!info->res) - goto err_out; - -@@ -194,7 +194,7 @@ static int __devinit of_flash_probe(stru - goto err_out; - } - -- info->map.name = dev->dev.bus_id; -+ info->map.name = dev_name(&dev->dev); - info->map.phys = res.start; - info->map.size = res.end - res.start + 1; - info->map.bankwidth = *width; ---- a/drivers/mtd/mtdconcat.c -+++ b/drivers/mtd/mtdconcat.c -@@ -691,7 +691,7 @@ static int concat_block_markbad(struct m - */ - struct mtd_info *mtd_concat_create(struct mtd_info *subdev[], /* subdevices to concatenate */ - int num_devs, /* number of subdevices */ -- char *name) -+ const char *name) - { /* name for the new device */ - int i; - size_t size; ---- a/drivers/mtd/nand/fsl_upm.c -+++ b/drivers/mtd/nand/fsl_upm.c -@@ -222,7 +222,7 @@ static int __devinit fun_probe(struct of - - fun->rnb_gpio = of_get_gpio(ofdev->node, 0); - if (fun->rnb_gpio >= 0) { -- ret = gpio_request(fun->rnb_gpio, ofdev->dev.bus_id); -+ ret = gpio_request(fun->rnb_gpio, dev_name(&ofdev->dev)); - if (ret) { - dev_err(&ofdev->dev, "can't request RNB gpio\n"); - goto err2; ---- a/drivers/mtd/nand/plat_nand.c -+++ b/drivers/mtd/nand/plat_nand.c -@@ -54,7 +54,7 @@ static int __init plat_nand_probe(struct - data->chip.priv = &data; - data->mtd.priv = &data->chip; - data->mtd.owner = THIS_MODULE; -- data->mtd.name = pdev->dev.bus_id; -+ data->mtd.name = dev_name(&pdev->dev); - - data->chip.IO_ADDR_R = data->io_base; - data->chip.IO_ADDR_W = data->io_base; ---- a/drivers/mtd/nand/tmio_nand.c -+++ b/drivers/mtd/nand/tmio_nand.c -@@ -433,7 +433,7 @@ static int tmio_probe(struct platform_de - nand_chip->chip_delay = 15; - - retval = request_irq(irq, &tmio_irq, -- IRQF_DISABLED, dev->dev.bus_id, tmio); -+ IRQF_DISABLED, dev_name(&dev->dev), tmio); - if (retval) { - dev_err(&dev->dev, "request_irq error %d\n", retval); - goto err_irq; ---- a/drivers/mtd/onenand/generic.c -+++ b/drivers/mtd/onenand/generic.c -@@ -63,7 +63,7 @@ static int __devinit generic_onenand_pro - info->onenand.mmcontrol = pdata->mmcontrol; - info->onenand.irq = platform_get_irq(pdev, 0); - -- info->mtd.name = pdev->dev.bus_id; -+ info->mtd.name = dev_name(&pdev->dev); - info->mtd.priv = &info->onenand; - info->mtd.owner = THIS_MODULE; - ---- a/drivers/mtd/onenand/omap2.c -+++ b/drivers/mtd/onenand/omap2.c -@@ -668,7 +668,7 @@ static int __devinit omap2_onenand_probe - c->onenand.base); - - c->pdev = pdev; -- c->mtd.name = pdev->dev.bus_id; -+ c->mtd.name = dev_name(&pdev->dev); - c->mtd.priv = &c->onenand; - c->mtd.owner = THIS_MODULE; - ---- a/drivers/mtd/ubi/build.c -+++ b/drivers/mtd/ubi/build.c -@@ -280,7 +280,7 @@ static int ubi_sysfs_init(struct ubi_dev - ubi->dev.release = dev_release; - ubi->dev.devt = ubi->cdev.dev; - ubi->dev.class = ubi_class; -- sprintf(&ubi->dev.bus_id[0], UBI_NAME_STR"%d", ubi->ubi_num); -+ dev_set_name(&ubi->dev, UBI_NAME_STR"%d", ubi->ubi_num); - err = device_register(&ubi->dev); - if (err) - return err; ---- a/drivers/mtd/ubi/vmt.c -+++ b/drivers/mtd/ubi/vmt.c -@@ -329,7 +329,7 @@ int ubi_create_volume(struct ubi_device - vol->dev.devt = dev; - vol->dev.class = ubi_class; - -- sprintf(&vol->dev.bus_id[0], "%s_%d", ubi->ubi_name, vol->vol_id); -+ dev_set_name(&vol->dev, "%s_%d", ubi->ubi_name, vol->vol_id); - err = device_register(&vol->dev); - if (err) { - ubi_err("cannot register device"); -@@ -678,7 +678,7 @@ int ubi_add_volume(struct ubi_device *ub - vol->dev.parent = &ubi->dev; - vol->dev.devt = dev; - vol->dev.class = ubi_class; -- sprintf(&vol->dev.bus_id[0], "%s_%d", ubi->ubi_name, vol->vol_id); -+ dev_set_name(&vol->dev, "%s_%d", ubi->ubi_name, vol->vol_id); - err = device_register(&vol->dev); - if (err) - goto out_gluebi; ---- a/include/linux/mtd/concat.h -+++ b/include/linux/mtd/concat.h -@@ -13,7 +13,7 @@ - struct mtd_info *mtd_concat_create( - struct mtd_info *subdev[], /* subdevices to concatenate */ - int num_devs, /* number of subdevices */ -- char *name); /* name for the new device */ -+ const char *name); /* name for the new device */ - - void mtd_concat_destroy(struct mtd_info *mtd); - diff --git a/driver-core/bus_id-mwave.patch b/driver-core/bus_id-mwave.patch deleted file mode 100644 index b752e37f88bd15..00000000000000 --- a/driver-core/bus_id-mwave.patch +++ /dev/null @@ -1,20 +0,0 @@ -From: Kay Sievers <kay.sievers@vrfy.org> -Subject: mwave: struct device - replace bus_id with dev_name(), dev_set_name() - -Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> ---- - drivers/char/mwave/mwavedd.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/char/mwave/mwavedd.c -+++ b/drivers/char/mwave/mwavedd.c -@@ -663,7 +663,7 @@ static int __init mwave_init(void) - #if 0 - /* sysfs */ - memset(&mwave_device, 0, sizeof (struct device)); -- snprintf(mwave_device.bus_id, BUS_ID_SIZE, "mwave"); -+ dev_set_name(&mwave_device, "mwave"); - - if (device_register(&mwave_device)) - goto cleanup_error; diff --git a/driver-core/bus_id-pnp.patch b/driver-core/bus_id-pnp.patch deleted file mode 100644 index 9ceef9faeffd9e..00000000000000 --- a/driver-core/bus_id-pnp.patch +++ /dev/null @@ -1,66 +0,0 @@ -From: Kay Sievers <kay.sievers@vrfy.org> -Subject: pnp: struct device - replace bus_id with dev_name(), dev_set_name() - -Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> ---- - drivers/pnp/card.c | 7 +++---- - drivers/pnp/core.c | 5 ++--- - drivers/pnp/system.c | 2 +- - 3 files changed, 6 insertions(+), 8 deletions(-) - ---- a/drivers/pnp/card.c -+++ b/drivers/pnp/card.c -@@ -165,8 +165,7 @@ struct pnp_card *pnp_alloc_card(struct p - card->number = id; - - card->dev.parent = &card->protocol->dev; -- sprintf(card->dev.bus_id, "%02x:%02x", card->protocol->number, -- card->number); -+ dev_set_name(&card->dev, "%02x:%02x", card->protocol->number, card->number); - - card->dev.coherent_dma_mask = DMA_24BIT_MASK; - card->dev.dma_mask = &card->dev.coherent_dma_mask; -@@ -295,8 +294,8 @@ int pnp_add_card_device(struct pnp_card - { - dev->dev.parent = &card->dev; - dev->card_link = NULL; -- snprintf(dev->dev.bus_id, BUS_ID_SIZE, "%02x:%02x.%02x", -- dev->protocol->number, card->number, dev->number); -+ dev_set_name(&dev->dev, "%02x:%02x.%02x", -+ dev->protocol->number, card->number, dev->number); - spin_lock(&pnp_lock); - dev->card = card; - list_add_tail(&dev->card_list, &card->devices); ---- a/drivers/pnp/core.c -+++ b/drivers/pnp/core.c -@@ -70,7 +70,7 @@ int pnp_register_protocol(struct pnp_pro - spin_unlock(&pnp_lock); - - protocol->number = nodenum; -- sprintf(protocol->dev.bus_id, "pnp%d", nodenum); -+ dev_set_name(&protocol->dev, "pnp%d", nodenum); - return device_register(&protocol->dev); - } - -@@ -145,8 +145,7 @@ struct pnp_dev *pnp_alloc_dev(struct pnp - dev->dev.coherent_dma_mask = dev->dma_mask; - dev->dev.release = &pnp_release_device; - -- sprintf(dev->dev.bus_id, "%02x:%02x", dev->protocol->number, -- dev->number); -+ dev_set_name(&dev->dev, "%02x:%02x", dev->protocol->number, dev->number); - - dev_id = pnp_add_id(dev, pnpid); - if (!dev_id) { ---- a/drivers/pnp/system.c -+++ b/drivers/pnp/system.c -@@ -26,7 +26,7 @@ static void reserve_range(struct pnp_dev - resource_size_t end, int port) - { - char *regionid; -- const char *pnpid = dev->dev.bus_id; -+ const char *pnpid = dev_name(&dev->dev); - struct resource *res; - - regionid = kmalloc(16, GFP_KERNEL); diff --git a/driver-core/bus_id-power.patch b/driver-core/bus_id-power.patch deleted file mode 100644 index e0fee5820adbd2..00000000000000 --- a/driver-core/bus_id-power.patch +++ /dev/null @@ -1,30 +0,0 @@ -From: Kay Sievers <kay.sievers@vrfy.org> -Subject: power-supply: struct device - replace bus_id with dev_name(), dev_set_name() - -CC: Anton Vorontsov <cbouatmailru@gmail.com> -Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> ---- - drivers/power/ds2760_battery.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/drivers/power/ds2760_battery.c -+++ b/drivers/power/ds2760_battery.c -@@ -354,7 +354,7 @@ static int ds2760_battery_probe(struct p - pdata = pdev->dev.platform_data; - di->dev = &pdev->dev; - di->w1_dev = pdev->dev.parent; -- di->bat.name = pdev->dev.bus_id; -+ di->bat.name = dev_name(&pdev->dev); - di->bat.type = POWER_SUPPLY_TYPE_BATTERY; - di->bat.properties = ds2760_battery_props; - di->bat.num_properties = ARRAY_SIZE(ds2760_battery_props); -@@ -371,7 +371,7 @@ static int ds2760_battery_probe(struct p - } - - INIT_DELAYED_WORK(&di->monitor_work, ds2760_battery_work); -- di->monitor_wqueue = create_singlethread_workqueue(pdev->dev.bus_id); -+ di->monitor_wqueue = create_singlethread_workqueue(dev_name(&pdev->dev)); - if (!di->monitor_wqueue) { - retval = -ESRCH; - goto workqueue_failed; diff --git a/driver-core/bus_id-serial.patch b/driver-core/bus_id-serial.patch deleted file mode 100644 index f744d07a026bc1..00000000000000 --- a/driver-core/bus_id-serial.patch +++ /dev/null @@ -1,29 +0,0 @@ -From: Kay Sievers <kay.sievers@vrfy.org> -Subject: serial: struct device - replace bus_id with dev_name(), dev_set_name() - -Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> ---- - drivers/serial/serial_core.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/drivers/serial/serial_core.c -+++ b/drivers/serial/serial_core.c -@@ -2030,7 +2030,7 @@ int uart_suspend_port(struct uart_driver - if (!tries) - printk(KERN_ERR "%s%s%s%d: Unable to drain " - "transmitter\n", -- port->dev ? port->dev->bus_id : "", -+ port->dev ? dev_name(port->dev) : "", - port->dev ? ": " : "", - drv->dev_name, - drv->tty_driver->name_base + port->line); -@@ -2156,7 +2156,7 @@ uart_report_port(struct uart_driver *drv - } - - printk(KERN_INFO "%s%s%s%d at %s (irq = %d) is a %s\n", -- port->dev ? port->dev->bus_id : "", -+ port->dev ? dev_name(port->dev) : "", - port->dev ? ": " : "", - drv->dev_name, - drv->tty_driver->name_base + port->line, diff --git a/driver-core/bus_id-sgi.patch b/driver-core/bus_id-sgi.patch deleted file mode 100644 index a635cdf85f1e5d..00000000000000 --- a/driver-core/bus_id-sgi.patch +++ /dev/null @@ -1,74 +0,0 @@ -From: Kay Sievers <kay.sievers@vrfy.org> -Subject: SGI: struct device - replace bus_id with dev_name(), dev_set_name() - -CC: Jack Steiner <steiner@sgi.com> -Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> ---- - drivers/misc/sgi-gru/grumain.c | 2 +- - drivers/misc/sgi-xp/xp_main.c | 2 +- - drivers/misc/sgi-xp/xpc_main.c | 8 ++++---- - drivers/misc/sgi-xp/xpnet.c | 2 +- - 4 files changed, 7 insertions(+), 7 deletions(-) - ---- a/drivers/misc/sgi-gru/grumain.c -+++ b/drivers/misc/sgi-gru/grumain.c -@@ -29,7 +29,7 @@ static struct device_driver gru_driver = - }; - - static struct device gru_device = { -- .bus_id = {0}, -+ .init_name = "", - .driver = &gru_driver, - }; - ---- a/drivers/misc/sgi-xp/xpc_main.c -+++ b/drivers/misc/sgi-xp/xpc_main.c -@@ -59,12 +59,12 @@ struct device_driver xpc_dbg_name = { - }; - - struct device xpc_part_dbg_subname = { -- .bus_id = {0}, /* set to "part" at xpc_init() time */ -+ .init_name = "", /* set to "part" at xpc_init() time */ - .driver = &xpc_dbg_name - }; - - struct device xpc_chan_dbg_subname = { -- .bus_id = {0}, /* set to "chan" at xpc_init() time */ -+ .init_name = "", /* set to "chan" at xpc_init() time */ - .driver = &xpc_dbg_name - }; - -@@ -1258,8 +1258,8 @@ xpc_init(void) - int ret; - struct task_struct *kthread; - -- snprintf(xpc_part->bus_id, BUS_ID_SIZE, "part"); -- snprintf(xpc_chan->bus_id, BUS_ID_SIZE, "chan"); -+ dev_set_name(xpc_part, "part"); -+ dev_set_name(xpc_chan, "chan"); - - if (is_shub()) { - /* ---- a/drivers/misc/sgi-xp/xp_main.c -+++ b/drivers/misc/sgi-xp/xp_main.c -@@ -25,7 +25,7 @@ struct device_driver xp_dbg_name = { - }; - - struct device xp_dbg_subname = { -- .bus_id = {0}, /* set to "" */ -+ .init_name = "", /* set to "" */ - .driver = &xp_dbg_name - }; - ---- a/drivers/misc/sgi-xp/xpnet.c -+++ b/drivers/misc/sgi-xp/xpnet.c -@@ -138,7 +138,7 @@ struct device_driver xpnet_dbg_name = { - }; - - struct device xpnet_dbg_subname = { -- .bus_id = {0}, /* set to "" */ -+ .init_name = "", /* set to "" */ - .driver = &xpnet_dbg_name - }; - diff --git a/driver-core/bus_id-spi.patch b/driver-core/bus_id-spi.patch deleted file mode 100644 index f95449c01a50ff..00000000000000 --- a/driver-core/bus_id-spi.patch +++ /dev/null @@ -1,121 +0,0 @@ -From: Kay Sievers <kay.sievers@vrfy.org> -Subject: spi: struct device - replace bus_id with dev_name(), dev_set_name() - -Acked-by: David Brownell <dbrownell@users.sourceforge.net> -Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> ---- - drivers/spi/spi.c | 20 +++++++++----------- - drivers/spi/spi_bitbang.c | 2 +- - drivers/spi/spi_butterfly.c | 2 +- - drivers/spi/spi_lm70llp.c | 2 +- - 4 files changed, 12 insertions(+), 14 deletions(-) - ---- a/drivers/spi/spi_bitbang.c -+++ b/drivers/spi/spi_bitbang.c -@@ -475,7 +475,7 @@ int spi_bitbang_start(struct spi_bitbang - /* this task is the only thing to touch the SPI bits */ - bitbang->busy = 0; - bitbang->workqueue = create_singlethread_workqueue( -- bitbang->master->dev.parent->bus_id); -+ dev_name(bitbang->master->dev.parent)); - if (bitbang->workqueue == NULL) { - status = -EBUSY; - goto err1; ---- a/drivers/spi/spi_butterfly.c -+++ b/drivers/spi/spi_butterfly.c -@@ -287,7 +287,7 @@ static void butterfly_attach(struct parp - pp->dataflash = spi_new_device(pp->bitbang.master, &pp->info[0]); - if (pp->dataflash) - pr_debug("%s: dataflash at %s\n", p->name, -- pp->dataflash->dev.bus_id); -+ dev_name(&pp->dataflash->dev)); - - // dev_info(_what?_, ...) - pr_info("%s: AVR Butterfly\n", p->name); ---- a/drivers/spi/spi.c -+++ b/drivers/spi/spi.c -@@ -47,7 +47,7 @@ modalias_show(struct device *dev, struct - { - const struct spi_device *spi = to_spi_device(dev); - -- return snprintf(buf, BUS_ID_SIZE + 1, "%s\n", spi->modalias); -+ return sprintf(buf, "%s\n", spi->modalias); - } - - static struct device_attribute spi_dev_attrs[] = { -@@ -63,7 +63,7 @@ static int spi_match_device(struct devic - { - const struct spi_device *spi = to_spi_device(dev); - -- return strncmp(spi->modalias, drv->name, BUS_ID_SIZE) == 0; -+ return strcmp(spi->modalias, drv->name) == 0; - } - - static int spi_uevent(struct device *dev, struct kobj_uevent_env *env) -@@ -243,8 +243,7 @@ int spi_add_device(struct spi_device *sp - } - - /* Set the bus ID string */ -- snprintf(spi->dev.bus_id, sizeof spi->dev.bus_id, -- "%s.%u", spi->master->dev.bus_id, -+ dev_set_name(&spi->dev, "%s.%u", dev_name(&spi->master->dev), - spi->chip_select); - - -@@ -254,7 +253,7 @@ int spi_add_device(struct spi_device *sp - */ - mutex_lock(&spi_add_lock); - -- if (bus_find_device_by_name(&spi_bus_type, NULL, spi->dev.bus_id) -+ if (bus_find_device_by_name(&spi_bus_type, NULL, dev_name(&spi->dev)) - != NULL) { - dev_err(dev, "chipselect %d already in use\n", - spi->chip_select); -@@ -269,7 +268,7 @@ int spi_add_device(struct spi_device *sp - status = spi->master->setup(spi); - if (status < 0) { - dev_err(dev, "can't %s %s, status %d\n", -- "setup", spi->dev.bus_id, status); -+ "setup", dev_name(&spi->dev), status); - goto done; - } - -@@ -277,9 +276,9 @@ int spi_add_device(struct spi_device *sp - status = device_add(&spi->dev); - if (status < 0) - dev_err(dev, "can't %s %s, status %d\n", -- "add", spi->dev.bus_id, status); -+ "add", dev_name(&spi->dev), status); - else -- dev_dbg(dev, "registered child %s\n", spi->dev.bus_id); -+ dev_dbg(dev, "registered child %s\n", dev_name(&spi->dev)); - - done: - mutex_unlock(&spi_add_lock); -@@ -504,12 +503,11 @@ int spi_register_master(struct spi_maste - /* register the device, then userspace will see it. - * registration fails if the bus ID is in use. - */ -- snprintf(master->dev.bus_id, sizeof master->dev.bus_id, -- "spi%u", master->bus_num); -+ dev_set_name(&master->dev, "spi%u", master->bus_num); - status = device_add(&master->dev); - if (status < 0) - goto done; -- dev_dbg(dev, "registered master %s%s\n", master->dev.bus_id, -+ dev_dbg(dev, "registered master %s%s\n", dev_name(&master->dev), - dynamic ? " (dynamic)" : ""); - - /* populate children from any spi device tables */ ---- a/drivers/spi/spi_lm70llp.c -+++ b/drivers/spi/spi_lm70llp.c -@@ -287,7 +287,7 @@ static void spi_lm70llp_attach(struct pa - pp->spidev_lm70 = spi_new_device(pp->bitbang.master, &pp->info); - if (pp->spidev_lm70) - dev_dbg(&pp->spidev_lm70->dev, "spidev_lm70 at %s\n", -- pp->spidev_lm70->dev.bus_id); -+ dev_name(&pp->spidev_lm70->dev)); - else { - printk(KERN_WARNING "%s: spi_new_device failed\n", DRVNAME); - status = -ENODEV; diff --git a/driver-core/bus_id-swiotlb.patch b/driver-core/bus_id-swiotlb.patch deleted file mode 100644 index 55ac863c1de3fe..00000000000000 --- a/driver-core/bus_id-swiotlb.patch +++ /dev/null @@ -1,20 +0,0 @@ -From: Kay Sievers <kay.sievers@vrfy.org> -Subject: swiotlb: struct device - replace bus_id with dev_name(), dev_set_name() - -Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> ---- - lib/swiotlb.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/lib/swiotlb.c -+++ b/lib/swiotlb.c -@@ -647,7 +647,7 @@ swiotlb_full(struct device *dev, size_t - * the damage, or panic when the transfer is too big. - */ - printk(KERN_ERR "DMA: Out of SW-IOMMU space for %zu bytes at " -- "device %s\n", size, dev ? dev->bus_id : "?"); -+ "device %s\n", size, dev ? dev_name(dev) : "?"); - - if (size > io_tlb_overflow && do_panic) { - if (dir == DMA_FROM_DEVICE || dir == DMA_BIDIRECTIONAL) diff --git a/driver-core/bus_id-thermal.patch b/driver-core/bus_id-thermal.patch deleted file mode 100644 index f8ca7a83e32fc3..00000000000000 --- a/driver-core/bus_id-thermal.patch +++ /dev/null @@ -1,38 +0,0 @@ -From: Kay Sievers <kay.sievers@vrfy.org> -Subject: thermal: struct device - replace bus_id with dev_name(), dev_set_name() - -Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> ---- - drivers/thermal/thermal_sys.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - ---- a/drivers/thermal/thermal_sys.c -+++ b/drivers/thermal/thermal_sys.c -@@ -579,7 +579,7 @@ static void thermal_release(struct devic - struct thermal_zone_device *tz; - struct thermal_cooling_device *cdev; - -- if (!strncmp(dev->bus_id, "thermal_zone", sizeof "thermal_zone" - 1)) { -+ if (!strncmp(dev_name(dev), "thermal_zone", sizeof "thermal_zone" - 1)) { - tz = to_thermal_zone(dev); - kfree(tz); - } else { -@@ -630,7 +630,7 @@ struct thermal_cooling_device *thermal_c - cdev->ops = ops; - cdev->device.class = &thermal_class; - cdev->devdata = devdata; -- sprintf(cdev->device.bus_id, "cooling_device%d", cdev->id); -+ dev_set_name(&cdev->device, "cooling_device%d", cdev->id); - result = device_register(&cdev->device); - if (result) { - release_idr(&thermal_cdev_idr, &thermal_idr_lock, cdev->id); -@@ -769,7 +769,7 @@ struct thermal_zone_device *thermal_zone - tz->device.class = &thermal_class; - tz->devdata = devdata; - tz->trips = trips; -- sprintf(tz->device.bus_id, "thermal_zone%d", tz->id); -+ dev_set_name(&tz->device, "thermal_zone%d", tz->id); - result = device_register(&tz->device); - if (result) { - release_idr(&thermal_tz_idr, &thermal_idr_lock, tz->id); diff --git a/driver-core/bus_id-tifm.patch b/driver-core/bus_id-tifm.patch deleted file mode 100644 index bbe0dad40d7095..00000000000000 --- a/driver-core/bus_id-tifm.patch +++ /dev/null @@ -1,44 +0,0 @@ -From: Kay Sievers <kay.sievers@vrfy.org> -Subject: tifm: struct device - replace bus_id with dev_name(), dev_set_name() - -Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> ---- - drivers/misc/tifm_7xx1.c | 2 +- - drivers/misc/tifm_core.c | 7 +++---- - 2 files changed, 4 insertions(+), 5 deletions(-) - ---- a/drivers/misc/tifm_7xx1.c -+++ b/drivers/misc/tifm_7xx1.c -@@ -164,7 +164,7 @@ static void tifm_7xx1_switch_media(struc - if (sock) { - printk(KERN_INFO - "%s : demand removing card from socket %u:%u\n", -- fm->dev.bus_id, fm->id, cnt); -+ dev_name(&fm->dev), fm->id, cnt); - fm->sockets[cnt] = NULL; - sock_addr = sock->addr; - spin_unlock_irqrestore(&fm->lock, flags); ---- a/drivers/misc/tifm_core.c -+++ b/drivers/misc/tifm_core.c -@@ -203,7 +203,7 @@ int tifm_add_adapter(struct tifm_adapter - if (rc) - return rc; - -- snprintf(fm->dev.bus_id, BUS_ID_SIZE, "tifm%u", fm->id); -+ dev_set_name(&fm->dev, "tifm%u", fm->id); - rc = device_add(&fm->dev); - if (rc) { - spin_lock(&tifm_adapter_lock); -@@ -266,9 +266,8 @@ struct tifm_dev *tifm_alloc_device(struc - sock->dev.dma_mask = fm->dev.parent->dma_mask; - sock->dev.release = tifm_free_device; - -- snprintf(sock->dev.bus_id, BUS_ID_SIZE, -- "tifm_%s%u:%u", tifm_media_type_name(type, 2), -- fm->id, id); -+ dev_set_name(&sock->dev, "tifm_%s%u:%u", -+ tifm_media_type_name(type, 2), fm->id, id); - printk(KERN_INFO DRIVER_NAME - ": %s card detected in socket %u:%u\n", - tifm_media_type_name(type, 0), fm->id, id); diff --git a/driver-core/bus_id-video.patch b/driver-core/bus_id-video.patch deleted file mode 100644 index ad339002129a45..00000000000000 --- a/driver-core/bus_id-video.patch +++ /dev/null @@ -1,44 +0,0 @@ -From: Kay Sievers <kay.sievers@vrfy.org> -Subject: video: struct device - replace bus_id with dev_name(), dev_set_name() - -Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> ---- - drivers/video/backlight/backlight.c | 2 +- - drivers/video/backlight/lcd.c | 2 +- - drivers/video/output.c | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - ---- a/drivers/video/backlight/backlight.c -+++ b/drivers/video/backlight/backlight.c -@@ -217,7 +217,7 @@ struct backlight_device *backlight_devic - new_bd->dev.class = backlight_class; - new_bd->dev.parent = parent; - new_bd->dev.release = bl_device_release; -- strlcpy(new_bd->dev.bus_id, name, BUS_ID_SIZE); -+ dev_set_name(&new_bd->dev, name); - dev_set_drvdata(&new_bd->dev, devdata); - - rc = device_register(&new_bd->dev); ---- a/drivers/video/backlight/lcd.c -+++ b/drivers/video/backlight/lcd.c -@@ -208,7 +208,7 @@ struct lcd_device *lcd_device_register(c - new_ld->dev.class = lcd_class; - new_ld->dev.parent = parent; - new_ld->dev.release = lcd_device_release; -- strlcpy(new_ld->dev.bus_id, name, BUS_ID_SIZE); -+ dev_set_name(&new_ld->dev, name); - dev_set_drvdata(&new_ld->dev, devdata); - - rc = device_register(&new_ld->dev); ---- a/drivers/video/output.c -+++ b/drivers/video/output.c -@@ -96,7 +96,7 @@ struct output_device *video_output_regis - new_dev->props = op; - new_dev->dev.class = &video_output_class; - new_dev->dev.parent = dev; -- strlcpy(new_dev->dev.bus_id,name, BUS_ID_SIZE); -+ dev_set_name(&new_dev->dev, name); - dev_set_drvdata(&new_dev->dev, devdata); - ret_code = device_register(&new_dev->dev); - if (ret_code) { diff --git a/driver-core/bus_id-w1.patch b/driver-core/bus_id-w1.patch deleted file mode 100644 index d942e0c2cf9a0f..00000000000000 --- a/driver-core/bus_id-w1.patch +++ /dev/null @@ -1,105 +0,0 @@ -From: Kay Sievers <kay.sievers@vrfy.org> -Subject: w1: struct device - replace bus_id with dev_name(), dev_set_name() - -CC: Evgeniy Polyakov <johnpol@2ka.mipt.ru> -Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> ---- - drivers/w1/w1.c | 19 +++++++++---------- - drivers/w1/w1_int.c | 3 +-- - 2 files changed, 10 insertions(+), 12 deletions(-) - ---- a/drivers/w1/w1.c -+++ b/drivers/w1/w1.c -@@ -197,7 +197,7 @@ struct device_driver w1_master_driver = - struct device w1_master_device = { - .parent = NULL, - .bus = &w1_bus_type, -- .bus_id = "w1 bus master", -+ .init_name = "w1 bus master", - .driver = &w1_master_driver, - .release = &w1_master_release - }; -@@ -211,7 +211,7 @@ static struct device_driver w1_slave_dri - struct device w1_slave_device = { - .parent = NULL, - .bus = &w1_bus_type, -- .bus_id = "w1 bus slave", -+ .init_name = "w1 bus slave", - .driver = &w1_slave_driver, - .release = &w1_slave_release - }; -@@ -573,7 +573,7 @@ static int w1_uevent(struct device *dev, - } - - dev_dbg(dev, "Hotplug event for %s %s, bus_id=%s.\n", -- event_owner, name, dev->bus_id); -+ event_owner, name, dev_name(dev)); - - if (dev->driver != &w1_slave_driver || !sl) - return 0; -@@ -605,8 +605,7 @@ static int __w1_attach_slave_device(stru - sl->dev.bus = &w1_bus_type; - sl->dev.release = &w1_slave_release; - -- snprintf(&sl->dev.bus_id[0], sizeof(sl->dev.bus_id), -- "%02x-%012llx", -+ dev_set_name(&sl->dev, "%02x-%012llx", - (unsigned int) sl->reg_num.family, - (unsigned long long) sl->reg_num.id); - snprintf(&sl->name[0], sizeof(sl->name), -@@ -615,13 +614,13 @@ static int __w1_attach_slave_device(stru - (unsigned long long) sl->reg_num.id); - - dev_dbg(&sl->dev, "%s: registering %s as %p.\n", __func__, -- &sl->dev.bus_id[0], sl); -+ dev_name(&sl->dev), sl); - - err = device_register(&sl->dev); - if (err < 0) { - dev_err(&sl->dev, - "Device registration [%s] failed. err=%d\n", -- sl->dev.bus_id, err); -+ dev_name(&sl->dev), err); - return err; - } - -@@ -630,7 +629,7 @@ static int __w1_attach_slave_device(stru - if (err < 0) { - dev_err(&sl->dev, - "sysfs file creation for [%s] failed. err=%d\n", -- sl->dev.bus_id, err); -+ dev_name(&sl->dev), err); - goto out_unreg; - } - -@@ -639,7 +638,7 @@ static int __w1_attach_slave_device(stru - if (err < 0) { - dev_err(&sl->dev, - "sysfs file creation for [%s] failed. err=%d\n", -- sl->dev.bus_id, err); -+ dev_name(&sl->dev), err); - goto out_rem1; - } - -@@ -648,7 +647,7 @@ static int __w1_attach_slave_device(stru - ((err = sl->family->fops->add_slave(sl)) < 0)) { - dev_err(&sl->dev, - "sysfs file creation for [%s] failed. err=%d\n", -- sl->dev.bus_id, err); -+ dev_name(&sl->dev), err); - goto out_rem2; - } - ---- a/drivers/w1/w1_int.c -+++ b/drivers/w1/w1_int.c -@@ -75,8 +75,7 @@ static struct w1_master * w1_alloc_dev(u - mutex_init(&dev->mutex); - - memcpy(&dev->dev, device, sizeof(struct device)); -- snprintf(dev->dev.bus_id, sizeof(dev->dev.bus_id), -- "w1_bus_master%u", dev->id); -+ dev_set_name(&dev->dev, "w1_bus_master%u", dev->id); - snprintf(dev->name, sizeof(dev->name), "w1_bus_master%u", dev->id); - - dev->driver = driver; diff --git a/driver-core/bus_id-xen.patch b/driver-core/bus_id-xen.patch deleted file mode 100644 index 616dc4a18be29f..00000000000000 --- a/driver-core/bus_id-xen.patch +++ /dev/null @@ -1,139 +0,0 @@ -From: Kay Sievers <kay.sievers@vrfy.org> -Subject: xen: struct device - replace bus_id with dev_name(), dev_set_name() - -CC: Jeremy Fitzhardinge <jeremy@goop.org> -Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> ---- - drivers/xen/xenbus/xenbus_probe.c | 27 +++++++++++++++------------ - drivers/xen/xenbus/xenbus_probe.h | 4 +++- - 2 files changed, 18 insertions(+), 13 deletions(-) - ---- a/drivers/xen/xenbus/xenbus_probe.c -+++ b/drivers/xen/xenbus/xenbus_probe.c -@@ -99,15 +99,15 @@ static int xenbus_uevent(struct device * - } - - /* device/<type>/<id> => <type>-<id> */ --static int frontend_bus_id(char bus_id[BUS_ID_SIZE], const char *nodename) -+static int frontend_bus_id(char bus_id[XEN_BUS_ID_SIZE], const char *nodename) - { - nodename = strchr(nodename, '/'); -- if (!nodename || strlen(nodename + 1) >= BUS_ID_SIZE) { -+ if (!nodename || strlen(nodename + 1) >= XEN_BUS_ID_SIZE) { - printk(KERN_WARNING "XENBUS: bad frontend %s\n", nodename); - return -EINVAL; - } - -- strlcpy(bus_id, nodename + 1, BUS_ID_SIZE); -+ strlcpy(bus_id, nodename + 1, XEN_BUS_ID_SIZE); - if (!strchr(bus_id, '/')) { - printk(KERN_WARNING "XENBUS: bus_id %s no slash\n", bus_id); - return -EINVAL; -@@ -460,6 +460,7 @@ int xenbus_probe_node(struct xen_bus_typ - const char *type, - const char *nodename) - { -+ char devname[XEN_BUS_ID_SIZE]; - int err; - struct xenbus_device *xendev; - size_t stringlen; -@@ -494,10 +495,12 @@ int xenbus_probe_node(struct xen_bus_typ - xendev->dev.bus = &bus->bus; - xendev->dev.release = xenbus_dev_release; - -- err = bus->get_bus_id(xendev->dev.bus_id, xendev->nodename); -+ err = bus->get_bus_id(devname, xendev->nodename); - if (err) - goto fail; - -+ dev_set_name(&xendev->dev, devname); -+ - /* Register with generic device framework. */ - err = device_register(&xendev->dev); - if (err) -@@ -611,7 +614,7 @@ void xenbus_dev_changed(const char *node - { - int exists, rootlen; - struct xenbus_device *dev; -- char type[BUS_ID_SIZE]; -+ char type[XEN_BUS_ID_SIZE]; - const char *p, *root; - - if (char_count(node, '/') < 2) -@@ -625,8 +628,8 @@ void xenbus_dev_changed(const char *node - - /* backend/<type>/... or device/<type>/... */ - p = strchr(node, '/') + 1; -- snprintf(type, BUS_ID_SIZE, "%.*s", (int)strcspn(p, "/"), p); -- type[BUS_ID_SIZE-1] = '\0'; -+ snprintf(type, XEN_BUS_ID_SIZE, "%.*s", (int)strcspn(p, "/"), p); -+ type[XEN_BUS_ID_SIZE-1] = '\0'; - - rootlen = strsep_len(node, '/', bus->levels); - if (rootlen < 0) -@@ -674,7 +677,7 @@ static int suspend_dev(struct device *de - err = drv->suspend(xdev); - if (err) - printk(KERN_WARNING -- "xenbus: suspend %s failed: %i\n", dev->bus_id, err); -+ "xenbus: suspend %s failed: %i\n", dev_name(dev), err); - return 0; - } - -@@ -695,7 +698,7 @@ static int suspend_cancel_dev(struct dev - if (err) - printk(KERN_WARNING - "xenbus: suspend_cancel %s failed: %i\n", -- dev->bus_id, err); -+ dev_name(dev), err); - return 0; - } - -@@ -717,7 +720,7 @@ static int resume_dev(struct device *dev - if (err) { - printk(KERN_WARNING - "xenbus: resume (talk_to_otherend) %s failed: %i\n", -- dev->bus_id, err); -+ dev_name(dev), err); - return err; - } - -@@ -728,7 +731,7 @@ static int resume_dev(struct device *dev - if (err) { - printk(KERN_WARNING - "xenbus: resume %s failed: %i\n", -- dev->bus_id, err); -+ dev_name(dev), err); - return err; - } - } -@@ -737,7 +740,7 @@ static int resume_dev(struct device *dev - if (err) { - printk(KERN_WARNING - "xenbus_probe: resume (watch_otherend) %s failed: " -- "%d.\n", dev->bus_id, err); -+ "%d.\n", dev_name(dev), err); - return err; - } - ---- a/drivers/xen/xenbus/xenbus_probe.h -+++ b/drivers/xen/xenbus/xenbus_probe.h -@@ -34,6 +34,8 @@ - #ifndef _XENBUS_PROBE_H - #define _XENBUS_PROBE_H - -+#define XEN_BUS_ID_SIZE 20 -+ - #ifdef CONFIG_XEN_BACKEND - extern void xenbus_backend_suspend(int (*fn)(struct device *, void *)); - extern void xenbus_backend_resume(int (*fn)(struct device *, void *)); -@@ -52,7 +54,7 @@ struct xen_bus_type - { - char *root; - unsigned int levels; -- int (*get_bus_id)(char bus_id[BUS_ID_SIZE], const char *nodename); -+ int (*get_bus_id)(char bus_id[XEN_BUS_ID_SIZE], const char *nodename); - int (*probe)(const char *type, const char *dir); - struct bus_type bus; - }; diff --git a/driver-core/driver-core-add-root_device_register.patch b/driver-core/driver-core-add-root_device_register.patch deleted file mode 100644 index 22c4a3ed372f32..00000000000000 --- a/driver-core/driver-core-add-root_device_register.patch +++ /dev/null @@ -1,147 +0,0 @@ -From markmc@redhat.com Thu Dec 18 16:14:10 2008 -From: Mark McLoughlin <markmc@redhat.com> -Date: Mon, 15 Dec 2008 12:58:26 +0000 -Subject: driver core: add root_device_register() -To: Greg KH <gregkh@suse.de> -Cc: Rusty Russell <rusty@rustcorp.com.au>, Anthony Liguori <aliguori@us.ibm.com>, Kay Sievers <kay.sievers@vrfy.org>, Cornelia Huck <cornelia.huck@de.ibm.com>, Mark McLoughlin <markmc@redhat.com> -Message-ID: <1229345909-27229-1-git-send-email-markmc@redhat.com> - - -Add support for allocating root device objects which group -device objects under /sys/devices directories. - -Also add a sysfs 'module' symlink which points to the owner -of the root device object. This symlink will be used in virtio -to allow userspace to determine which virtio bus implementation -a given device is associated with. - -[Includes suggestions from Cornelia Huck] - -Signed-off-by: Mark McLoughlin <markmc@redhat.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/base/core.c | 91 +++++++++++++++++++++++++++++++++++++++++++++++++ - include/linux/device.h | 11 +++++ - 2 files changed, 102 insertions(+) - ---- a/drivers/base/core.c -+++ b/drivers/base/core.c -@@ -1217,6 +1217,97 @@ EXPORT_SYMBOL_GPL(put_device); - EXPORT_SYMBOL_GPL(device_create_file); - EXPORT_SYMBOL_GPL(device_remove_file); - -+struct root_device -+{ -+ struct device dev; -+ struct module *owner; -+}; -+ -+#define to_root_device(dev) container_of(dev, struct root_device, dev) -+ -+static void root_device_release(struct device *dev) -+{ -+ kfree(to_root_device(dev)); -+} -+ -+/** -+ * __root_device_register - allocate and register a root device -+ * @name: root device name -+ * @owner: owner module of the root device, usually THIS_MODULE -+ * -+ * This function allocates a root device and registers it -+ * using device_register(). In order to free the returned -+ * device, use root_device_unregister(). -+ * -+ * Root devices are dummy devices which allow other devices -+ * to be grouped under /sys/devices. Use this function to -+ * allocate a root device and then use it as the parent of -+ * any device which should appear under /sys/devices/{name} -+ * -+ * The /sys/devices/{name} directory will also contain a -+ * 'module' symlink which points to the @owner directory -+ * in sysfs. -+ * -+ * Note: You probably want to use root_device_register(). -+ */ -+struct device *__root_device_register(const char *name, struct module *owner) -+{ -+ struct root_device *root; -+ int err = -ENOMEM; -+ -+ root = kzalloc(sizeof(struct root_device), GFP_KERNEL); -+ if (!root) -+ return ERR_PTR(err); -+ -+ err = dev_set_name(&root->dev, name); -+ if (err) { -+ kfree(root); -+ return ERR_PTR(err); -+ } -+ -+ root->dev.release = root_device_release; -+ -+ err = device_register(&root->dev); -+ if (err) { -+ put_device(&root->dev); -+ return ERR_PTR(err); -+ } -+ -+#ifdef CONFIG_MODULE /* gotta find a "cleaner" way to do this */ -+ if (owner) { -+ struct module_kobject *mk = &owner->mkobj; -+ -+ err = sysfs_create_link(&root->dev.kobj, &mk->kobj, "module"); -+ if (err) { -+ device_unregister(&root->dev); -+ return ERR_PTR(err); -+ } -+ root->owner = owner; -+ } -+#endif -+ -+ return &root->dev; -+} -+EXPORT_SYMBOL_GPL(__root_device_register); -+ -+/** -+ * root_device_unregister - unregister and free a root device -+ * @root: device going away. -+ * -+ * This function unregisters and cleans up a device that was created by -+ * root_device_register(). -+ */ -+void root_device_unregister(struct device *dev) -+{ -+ struct root_device *root = to_root_device(dev); -+ -+ if (root->owner) -+ sysfs_remove_link(&root->dev.kobj, "module"); -+ -+ device_unregister(dev); -+} -+EXPORT_SYMBOL_GPL(root_device_unregister); -+ - - static void device_create_release(struct device *dev) - { ---- a/include/linux/device.h -+++ b/include/linux/device.h -@@ -483,6 +483,17 @@ extern int device_rename(struct device * - extern int device_move(struct device *dev, struct device *new_parent); - - /* -+ * Root device objects for grouping under /sys/devices -+ */ -+extern struct device *__root_device_register(const char *name, -+ struct module *owner); -+static inline struct device *root_device_register(const char *name) -+{ -+ return __root_device_register(name, THIS_MODULE); -+} -+extern void root_device_unregister(struct device *root); -+ -+/* - * Manual binding of a device to driver. See drivers/base/bus.c - * for information on use. - */ diff --git a/driver-core/driver-core-create-a-private-portion-of-struct-device.patch b/driver-core/driver-core-create-a-private-portion-of-struct-device.patch deleted file mode 100644 index 01622eee2e8c93..00000000000000 --- a/driver-core/driver-core-create-a-private-portion-of-struct-device.patch +++ /dev/null @@ -1,89 +0,0 @@ -From foo@baz Tue Dec 16 12:23:36 PST 2008 -Date: Tue, 16 Dec 2008 12:23:36 -0800 -To: Greg KH <greg@kroah.com> -From: Greg Kroah-Hartman <gregkh@suse.de> -Subject: driver core: create a private portion of struct device - -This is to be used to move things out of struct device that no code -outside of the driver core should ever touch. - -Cc: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/base/base.h | 12 ++++++++++++ - drivers/base/core.c | 8 ++++++++ - include/linux/device.h | 3 +++ - 3 files changed, 23 insertions(+) - ---- a/drivers/base/base.h -+++ b/drivers/base/base.h -@@ -63,6 +63,18 @@ struct class_private { - #define to_class(obj) \ - container_of(obj, struct class_private, class_subsys.kobj) - -+/** -+ * struct device_private - structure to hold the private to the driver core portions of the device structure. -+ * -+ * @device - pointer back to the struct class that this structure is -+ * associated with. -+ * -+ * Nothing outside of the driver core should ever touch these fields. -+ */ -+struct device_private { -+ struct device *device; -+}; -+ - /* initialisation functions */ - extern int devices_init(void); - extern int buses_init(void); ---- a/drivers/base/core.c -+++ b/drivers/base/core.c -@@ -109,6 +109,7 @@ static struct sysfs_ops dev_sysfs_ops = - static void device_release(struct kobject *kobj) - { - struct device *dev = to_dev(kobj); -+ struct device_private *p = dev->p; - - if (dev->release) - dev->release(dev); -@@ -120,6 +121,7 @@ static void device_release(struct kobjec - WARN(1, KERN_ERR "Device '%s' does not have a release() " - "function, it is broken and must be fixed.\n", - dev_name(dev)); -+ kfree(p); - } - - static struct kobj_type device_ktype = { -@@ -536,6 +538,12 @@ static void klist_children_put(struct kl - */ - void device_initialize(struct device *dev) - { -+ dev->p = kzalloc(sizeof(*dev->p), GFP_KERNEL); -+ if (!dev->p) { -+ WARN_ON(1); -+ return; -+ } -+ dev->p->device = dev; - dev->kobj.kset = devices_kset; - kobject_init(&dev->kobj, &device_ktype); - klist_init(&dev->klist_children, klist_children_get, ---- a/include/linux/device.h -+++ b/include/linux/device.h -@@ -28,6 +28,7 @@ - #define BUS_ID_SIZE 20 - - struct device; -+struct device_private; - struct device_driver; - struct driver_private; - struct class; -@@ -371,6 +372,8 @@ struct device { - struct klist_node knode_bus; - struct device *parent; - -+ struct device_private *p; -+ - struct kobject kobj; - char bus_id[BUS_ID_SIZE]; /* position on parent bus */ - unsigned uevent_suppress:1; diff --git a/driver-core/driver-core-fix-duplicate-removing-driver-link-in-__device_release_driver.patch b/driver-core/driver-core-fix-duplicate-removing-driver-link-in-__device_release_driver.patch deleted file mode 100644 index d4dc05c014d42e..00000000000000 --- a/driver-core/driver-core-fix-duplicate-removing-driver-link-in-__device_release_driver.patch +++ /dev/null @@ -1,33 +0,0 @@ -From tom.leiming@gmail.com Thu Dec 18 16:20:06 2008 -From: Ming Lei <tom.leiming@gmail.com> -Date: Wed, 17 Dec 2008 23:15:35 +0800 -Subject: driver core:fix duplicate removing driver link in __device_release_driver -To: kay.sievers@vrfy.org, greg@kroah.com -Cc: linux-kernel@vger.kernel.org, Ming Lei <tom.leiming@gmail.com> -Message-ID: <1229526935-7505-1-git-send-email-tom.leiming@gmail.com> - - -From: Ming Lei <tom.leiming@gmail.com> - -In __device_release_driver(),driver_sysfs_remove() has removed the -driver link under device dir in sysfs, but sysfs_remove_link() is -called again to do such thing. Remove the duplicate call to -sys_remove_link(). - -Signed-off-by: Ming Lei <tom.leiming@gmail.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/base/dd.c | 1 - - 1 file changed, 1 deletion(-) - ---- a/drivers/base/dd.c -+++ b/drivers/base/dd.c -@@ -298,7 +298,6 @@ static void __device_release_driver(stru - drv = dev->driver; - if (drv) { - driver_sysfs_remove(dev); -- sysfs_remove_link(&dev->kobj, "driver"); - - if (dev->bus) - blocking_notifier_call_chain(&dev->bus->p->bus_notifier, diff --git a/driver-core/driver-core-move-klist_children-into-private-structure.patch b/driver-core/driver-core-move-klist_children-into-private-structure.patch deleted file mode 100644 index 3e0167c92b36a2..00000000000000 --- a/driver-core/driver-core-move-klist_children-into-private-structure.patch +++ /dev/null @@ -1,163 +0,0 @@ -From foo@baz Tue Dec 16 12:24:56 PST 2008 -Date: Tue, 16 Dec 2008 12:24:56 -0800 -To: Greg KH <greg@kroah.com> -From: Greg Kroah-Hartman <gregkh@suse.de> -Subject: driver core: move klist_children into private structure - -Nothing outside of the driver core should ever touch klist_children, or -knode_parent, so move them out of the public eye. - -Cc: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/base/base.h | 6 ++++++ - drivers/base/core.c | 37 ++++++++++++++++++++++++------------- - include/linux/device.h | 2 -- - 3 files changed, 30 insertions(+), 15 deletions(-) - ---- a/drivers/base/base.h -+++ b/drivers/base/base.h -@@ -66,14 +66,20 @@ struct class_private { - /** - * struct device_private - structure to hold the private to the driver core portions of the device structure. - * -+ * @klist_children - klist containing all children of this device -+ * @knode_parent - node in sibling list - * @device - pointer back to the struct class that this structure is - * associated with. - * - * Nothing outside of the driver core should ever touch these fields. - */ - struct device_private { -+ struct klist klist_children; -+ struct klist_node knode_parent; - struct device *device; - }; -+#define to_device_private_parent(obj) \ -+ container_of(obj, struct device_private, knode_parent) - - /* initialisation functions */ - extern int devices_init(void); ---- a/drivers/base/core.c -+++ b/drivers/base/core.c -@@ -509,14 +509,16 @@ EXPORT_SYMBOL_GPL(device_schedule_callba - - static void klist_children_get(struct klist_node *n) - { -- struct device *dev = container_of(n, struct device, knode_parent); -+ struct device_private *p = to_device_private_parent(n); -+ struct device *dev = p->device; - - get_device(dev); - } - - static void klist_children_put(struct klist_node *n) - { -- struct device *dev = container_of(n, struct device, knode_parent); -+ struct device_private *p = to_device_private_parent(n); -+ struct device *dev = p->device; - - put_device(dev); - } -@@ -546,7 +548,7 @@ void device_initialize(struct device *de - dev->p->device = dev; - dev->kobj.kset = devices_kset; - kobject_init(&dev->kobj, &device_ktype); -- klist_init(&dev->klist_children, klist_children_get, -+ klist_init(&dev->p->klist_children, klist_children_get, - klist_children_put); - INIT_LIST_HEAD(&dev->dma_pools); - init_MUTEX(&dev->sem); -@@ -927,7 +929,8 @@ int device_add(struct device *dev) - kobject_uevent(&dev->kobj, KOBJ_ADD); - bus_attach_device(dev); - if (parent) -- klist_add_tail(&dev->knode_parent, &parent->klist_children); -+ klist_add_tail(&dev->p->knode_parent, -+ &parent->p->klist_children); - - if (dev->class) { - mutex_lock(&dev->class->p->class_mutex); -@@ -1038,7 +1041,7 @@ void device_del(struct device *dev) - device_pm_remove(dev); - dpm_sysfs_remove(dev); - if (parent) -- klist_del(&dev->knode_parent); -+ klist_del(&dev->p->knode_parent); - if (MAJOR(dev->devt)) { - device_remove_sys_dev_entry(dev); - device_remove_file(dev, &devt_attr); -@@ -1102,7 +1105,14 @@ void device_unregister(struct device *de - static struct device *next_device(struct klist_iter *i) - { - struct klist_node *n = klist_next(i); -- return n ? container_of(n, struct device, knode_parent) : NULL; -+ struct device *dev = NULL; -+ struct device_private *p; -+ -+ if (n) { -+ p = to_device_private_parent(n); -+ dev = p->device; -+ } -+ return dev; - } - - /** -@@ -1124,7 +1134,7 @@ int device_for_each_child(struct device - struct device *child; - int error = 0; - -- klist_iter_init(&parent->klist_children, &i); -+ klist_iter_init(&parent->p->klist_children, &i); - while ((child = next_device(&i)) && !error) - error = fn(child, data); - klist_iter_exit(&i); -@@ -1155,7 +1165,7 @@ struct device *device_find_child(struct - if (!parent) - return NULL; - -- klist_iter_init(&parent->klist_children, &i); -+ klist_iter_init(&parent->p->klist_children, &i); - while ((child = next_device(&i))) - if (match(child, data) && get_device(child)) - break; -@@ -1478,9 +1488,10 @@ int device_move(struct device *dev, stru - old_parent = dev->parent; - dev->parent = new_parent; - if (old_parent) -- klist_remove(&dev->knode_parent); -+ klist_remove(&dev->p->knode_parent); - if (new_parent) { -- klist_add_tail(&dev->knode_parent, &new_parent->klist_children); -+ klist_add_tail(&dev->p->knode_parent, -+ &new_parent->p->klist_children); - set_dev_node(dev, dev_to_node(new_parent)); - } - -@@ -1492,11 +1503,11 @@ int device_move(struct device *dev, stru - device_move_class_links(dev, new_parent, old_parent); - if (!kobject_move(&dev->kobj, &old_parent->kobj)) { - if (new_parent) -- klist_remove(&dev->knode_parent); -+ klist_remove(&dev->p->knode_parent); - dev->parent = old_parent; - if (old_parent) { -- klist_add_tail(&dev->knode_parent, -- &old_parent->klist_children); -+ klist_add_tail(&dev->p->knode_parent, -+ &old_parent->p->klist_children); - set_dev_node(dev, dev_to_node(old_parent)); - } - } ---- a/include/linux/device.h -+++ b/include/linux/device.h -@@ -366,8 +366,6 @@ struct device_dma_parameters { - }; - - struct device { -- struct klist klist_children; -- struct klist_node knode_parent; /* node in sibling list */ - struct klist_node knode_driver; - struct klist_node knode_bus; - struct device *parent; diff --git a/driver-core/driver-core-move-knode_bus-into-private-structure.patch b/driver-core/driver-core-move-knode_bus-into-private-structure.patch deleted file mode 100644 index 1870985bade9e1..00000000000000 --- a/driver-core/driver-core-move-knode_bus-into-private-structure.patch +++ /dev/null @@ -1,173 +0,0 @@ -From foo@baz Tue Dec 16 12:26:21 PST 2008 -Date: Tue, 16 Dec 2008 12:26:21 -0800 -To: Greg KH <greg@kroah.com> -From: Greg Kroah-Hartman <gregkh@suse.de> -Subject: driver core: move knode_bus into private structure - -Nothing outside of the driver core should ever touch knode_bus, so -move it out of the public eye. - -Cc: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/base/base.h | 4 ++++ - drivers/base/bus.c | 40 +++++++++++++++++++++++++++------------- - include/linux/device.h | 1 - - 3 files changed, 31 insertions(+), 14 deletions(-) - ---- a/drivers/base/base.h -+++ b/drivers/base/base.h -@@ -69,6 +69,7 @@ struct class_private { - * @klist_children - klist containing all children of this device - * @knode_parent - node in sibling list - * @knode_driver - node in driver list -+ * @knode_bus - node in bus list - * @device - pointer back to the struct class that this structure is - * associated with. - * -@@ -78,12 +79,15 @@ struct device_private { - struct klist klist_children; - struct klist_node knode_parent; - struct klist_node knode_driver; -+ struct klist_node knode_bus; - struct device *device; - }; - #define to_device_private_parent(obj) \ - container_of(obj, struct device_private, knode_parent) - #define to_device_private_driver(obj) \ - container_of(obj, struct device_private, knode_driver) -+#define to_device_private_bus(obj) \ -+ container_of(obj, struct device_private, knode_bus) - - /* initialisation functions */ - extern int devices_init(void); ---- a/drivers/base/bus.c -+++ b/drivers/base/bus.c -@@ -253,7 +253,14 @@ static ssize_t store_drivers_probe(struc - static struct device *next_device(struct klist_iter *i) - { - struct klist_node *n = klist_next(i); -- return n ? container_of(n, struct device, knode_bus) : NULL; -+ struct device *dev = NULL; -+ struct device_private *dev_prv; -+ -+ if (n) { -+ dev_prv = to_device_private_bus(n); -+ dev = dev_prv->device; -+ } -+ return dev; - } - - /** -@@ -286,7 +293,7 @@ int bus_for_each_dev(struct bus_type *bu - return -EINVAL; - - klist_iter_init_node(&bus->p->klist_devices, &i, -- (start ? &start->knode_bus : NULL)); -+ (start ? &start->p->knode_bus : NULL)); - while ((dev = next_device(&i)) && !error) - error = fn(dev, data); - klist_iter_exit(&i); -@@ -320,7 +327,7 @@ struct device *bus_find_device(struct bu - return NULL; - - klist_iter_init_node(&bus->p->klist_devices, &i, -- (start ? &start->knode_bus : NULL)); -+ (start ? &start->p->knode_bus : NULL)); - while ((dev = next_device(&i))) - if (match(dev, data) && get_device(dev)) - break; -@@ -507,7 +514,8 @@ void bus_attach_device(struct device *de - ret = device_attach(dev); - WARN_ON(ret < 0); - if (ret >= 0) -- klist_add_tail(&dev->knode_bus, &bus->p->klist_devices); -+ klist_add_tail(&dev->p->knode_bus, -+ &bus->p->klist_devices); - } - } - -@@ -528,8 +536,8 @@ void bus_remove_device(struct device *de - sysfs_remove_link(&dev->bus->p->devices_kset->kobj, - dev_name(dev)); - device_remove_attrs(dev->bus, dev); -- if (klist_node_attached(&dev->knode_bus)) -- klist_del(&dev->knode_bus); -+ if (klist_node_attached(&dev->p->knode_bus)) -+ klist_del(&dev->p->knode_bus); - - pr_debug("bus: '%s': remove device %s\n", - dev->bus->name, dev_name(dev)); -@@ -831,14 +839,16 @@ static void bus_remove_attrs(struct bus_ - - static void klist_devices_get(struct klist_node *n) - { -- struct device *dev = container_of(n, struct device, knode_bus); -+ struct device_private *dev_prv = to_device_private_bus(n); -+ struct device *dev = dev_prv->device; - - get_device(dev); - } - - static void klist_devices_put(struct klist_node *n) - { -- struct device *dev = container_of(n, struct device, knode_bus); -+ struct device_private *dev_prv = to_device_private_bus(n); -+ struct device *dev = dev_prv->device; - - put_device(dev); - } -@@ -993,18 +1003,20 @@ static void device_insertion_sort_klist( - { - struct list_head *pos; - struct klist_node *n; -+ struct device_private *dev_prv; - struct device *b; - - list_for_each(pos, list) { - n = container_of(pos, struct klist_node, n_node); -- b = container_of(n, struct device, knode_bus); -+ dev_prv = to_device_private_bus(n); -+ b = dev_prv->device; - if (compare(a, b) <= 0) { -- list_move_tail(&a->knode_bus.n_node, -- &b->knode_bus.n_node); -+ list_move_tail(&a->p->knode_bus.n_node, -+ &b->p->knode_bus.n_node); - return; - } - } -- list_move_tail(&a->knode_bus.n_node, list); -+ list_move_tail(&a->p->knode_bus.n_node, list); - } - - void bus_sort_breadthfirst(struct bus_type *bus, -@@ -1014,6 +1026,7 @@ void bus_sort_breadthfirst(struct bus_ty - LIST_HEAD(sorted_devices); - struct list_head *pos, *tmp; - struct klist_node *n; -+ struct device_private *dev_prv; - struct device *dev; - struct klist *device_klist; - -@@ -1022,7 +1035,8 @@ void bus_sort_breadthfirst(struct bus_ty - spin_lock(&device_klist->k_lock); - list_for_each_safe(pos, tmp, &device_klist->k_list) { - n = container_of(pos, struct klist_node, n_node); -- dev = container_of(n, struct device, knode_bus); -+ dev_prv = to_device_private_bus(n); -+ dev = dev_prv->device; - device_insertion_sort_klist(dev, &sorted_devices, compare); - } - list_splice(&sorted_devices, &device_klist->k_list); ---- a/include/linux/device.h -+++ b/include/linux/device.h -@@ -366,7 +366,6 @@ struct device_dma_parameters { - }; - - struct device { -- struct klist_node knode_bus; - struct device *parent; - - struct device_private *p; diff --git a/driver-core/driver-core-move-knode_driver-into-private-structure.patch b/driver-core/driver-core-move-knode_driver-into-private-structure.patch deleted file mode 100644 index 195861764d0a4d..00000000000000 --- a/driver-core/driver-core-move-knode_driver-into-private-structure.patch +++ /dev/null @@ -1,139 +0,0 @@ -From foo@baz Tue Dec 16 12:25:49 PST 2008 -Date: Tue, 16 Dec 2008 12:25:49 -0800 -To: Greg KH <greg@kroah.com> -From: Greg Kroah-Hartman <gregkh@suse.de> -Subject: driver core: move knode_driver into private structure - -Nothing outside of the driver core should ever touch knode_driver, so -move it out of the public eye. - -Cc: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/base/base.h | 4 ++++ - drivers/base/dd.c | 13 ++++++++----- - drivers/base/driver.c | 13 ++++++++++--- - include/linux/device.h | 1 - - 4 files changed, 22 insertions(+), 9 deletions(-) - ---- a/drivers/base/base.h -+++ b/drivers/base/base.h -@@ -68,6 +68,7 @@ struct class_private { - * - * @klist_children - klist containing all children of this device - * @knode_parent - node in sibling list -+ * @knode_driver - node in driver list - * @device - pointer back to the struct class that this structure is - * associated with. - * -@@ -76,10 +77,13 @@ struct class_private { - struct device_private { - struct klist klist_children; - struct klist_node knode_parent; -+ struct klist_node knode_driver; - struct device *device; - }; - #define to_device_private_parent(obj) \ - container_of(obj, struct device_private, knode_parent) -+#define to_device_private_driver(obj) \ -+ container_of(obj, struct device_private, knode_driver) - - /* initialisation functions */ - extern int devices_init(void); ---- a/drivers/base/dd.c -+++ b/drivers/base/dd.c -@@ -28,7 +28,7 @@ - - static void driver_bound(struct device *dev) - { -- if (klist_node_attached(&dev->knode_driver)) { -+ if (klist_node_attached(&dev->p->knode_driver)) { - printk(KERN_WARNING "%s: device %s already bound\n", - __func__, kobject_name(&dev->kobj)); - return; -@@ -41,7 +41,7 @@ static void driver_bound(struct device * - blocking_notifier_call_chain(&dev->bus->p->bus_notifier, - BUS_NOTIFY_BOUND_DRIVER, dev); - -- klist_add_tail(&dev->knode_driver, &dev->driver->p->klist_devices); -+ klist_add_tail(&dev->p->knode_driver, &dev->driver->p->klist_devices); - } - - static int driver_sysfs_add(struct device *dev) -@@ -311,7 +311,7 @@ static void __device_release_driver(stru - drv->remove(dev); - devres_release_all(dev); - dev->driver = NULL; -- klist_remove(&dev->knode_driver); -+ klist_remove(&dev->p->knode_driver); - } - } - -@@ -341,6 +341,7 @@ EXPORT_SYMBOL_GPL(device_release_driver) - */ - void driver_detach(struct device_driver *drv) - { -+ struct device_private *dev_prv; - struct device *dev; - - for (;;) { -@@ -349,8 +350,10 @@ void driver_detach(struct device_driver - spin_unlock(&drv->p->klist_devices.k_lock); - break; - } -- dev = list_entry(drv->p->klist_devices.k_list.prev, -- struct device, knode_driver.n_node); -+ dev_prv = list_entry(drv->p->klist_devices.k_list.prev, -+ struct device_private, -+ knode_driver.n_node); -+ dev = dev_prv->device; - get_device(dev); - spin_unlock(&drv->p->klist_devices.k_lock); - ---- a/drivers/base/driver.c -+++ b/drivers/base/driver.c -@@ -19,7 +19,14 @@ - static struct device *next_device(struct klist_iter *i) - { - struct klist_node *n = klist_next(i); -- return n ? container_of(n, struct device, knode_driver) : NULL; -+ struct device *dev = NULL; -+ struct device_private *dev_prv; -+ -+ if (n) { -+ dev_prv = to_device_private_driver(n); -+ dev = dev_prv->device; -+ } -+ return dev; - } - - /** -@@ -42,7 +49,7 @@ int driver_for_each_device(struct device - return -EINVAL; - - klist_iter_init_node(&drv->p->klist_devices, &i, -- start ? &start->knode_driver : NULL); -+ start ? &start->p->knode_driver : NULL); - while ((dev = next_device(&i)) && !error) - error = fn(dev, data); - klist_iter_exit(&i); -@@ -76,7 +83,7 @@ struct device *driver_find_device(struct - return NULL; - - klist_iter_init_node(&drv->p->klist_devices, &i, -- (start ? &start->knode_driver : NULL)); -+ (start ? &start->p->knode_driver : NULL)); - while ((dev = next_device(&i))) - if (match(dev, data) && get_device(dev)) - break; ---- a/include/linux/device.h -+++ b/include/linux/device.h -@@ -366,7 +366,6 @@ struct device_dma_parameters { - }; - - struct device { -- struct klist_node knode_driver; - struct klist_node knode_bus; - struct device *parent; - diff --git a/driver-core/driver-core-move-the-bus-notifier-call-points.patch b/driver-core/driver-core-move-the-bus-notifier-call-points.patch deleted file mode 100644 index 82c1edf0735cb0..00000000000000 --- a/driver-core/driver-core-move-the-bus-notifier-call-points.patch +++ /dev/null @@ -1,86 +0,0 @@ -From stern@rowland.harvard.edu Tue Dec 16 14:37:34 2008 -From: Alan Stern <stern@rowland.harvard.edu> -Date: Fri, 5 Dec 2008 14:10:31 -0500 (EST) -Subject: Driver core: move the bus notifier call points -To: Greg KH <greg@kroah.com> -Cc: Kay Sievers <kay.sievers@vrfy.org> -Message-ID: <Pine.LNX.4.44L0.0812051407160.2262-100000@iolanthe.rowland.org> - - -This patch (as1184) changes the location of the notifications in -device_add() and device_del(). Now the BUS_NOTIFY_ADD_DEVICE message -is sent after dpm_sysfs_add(), which is necessary for clients that -want to add attributes to the power/ subdirectory. The -BUS_NOTIFY_DEL_DEVICE message is correspondingly moved before -dpm_sysfs_remove(). - -Signed-off-by: Alan Stern <stern@rowland.harvard.edu> -Cc: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/base/core.c | 25 ++++++++++++++----------- - 1 file changed, 14 insertions(+), 11 deletions(-) - ---- a/drivers/base/core.c -+++ b/drivers/base/core.c -@@ -894,11 +894,6 @@ int device_add(struct device *dev) - if (platform_notify) - platform_notify(dev); - -- /* notify clients of device entry (new way) */ -- if (dev->bus) -- blocking_notifier_call_chain(&dev->bus->p->bus_notifier, -- BUS_NOTIFY_ADD_DEVICE, dev); -- - error = device_create_file(dev, &uevent_attr); - if (error) - goto attrError; -@@ -926,6 +921,14 @@ int device_add(struct device *dev) - if (error) - goto DPMError; - device_pm_add(dev); -+ -+ /* Notify clients of device addition. This call must come -+ * after dpm_sysf_add() and before kobject_uevent(). -+ */ -+ if (dev->bus) -+ blocking_notifier_call_chain(&dev->bus->p->bus_notifier, -+ BUS_NOTIFY_ADD_DEVICE, dev); -+ - kobject_uevent(&dev->kobj, KOBJ_ADD); - bus_attach_device(dev); - if (parent) -@@ -951,9 +954,6 @@ done: - DPMError: - bus_remove_device(dev); - BusError: -- if (dev->bus) -- blocking_notifier_call_chain(&dev->bus->p->bus_notifier, -- BUS_NOTIFY_DEL_DEVICE, dev); - device_remove_attrs(dev); - AttrsError: - device_remove_class_symlinks(dev); -@@ -1038,6 +1038,12 @@ void device_del(struct device *dev) - struct device *parent = dev->parent; - struct class_interface *class_intf; - -+ /* Notify clients of device removal. This call must come -+ * before dpm_sysfs_remove(). -+ */ -+ if (dev->bus) -+ blocking_notifier_call_chain(&dev->bus->p->bus_notifier, -+ BUS_NOTIFY_DEL_DEVICE, dev); - device_pm_remove(dev); - dpm_sysfs_remove(dev); - if (parent) -@@ -1075,9 +1081,6 @@ void device_del(struct device *dev) - */ - if (platform_notify_remove) - platform_notify_remove(dev); -- if (dev->bus) -- blocking_notifier_call_chain(&dev->bus->p->bus_notifier, -- BUS_NOTIFY_DEL_DEVICE, dev); - kobject_uevent(&dev->kobj, KOBJ_REMOVE); - cleanup_device_parent(dev); - kobject_del(&dev->kobj); diff --git a/driver-core/driver-core-rearrange-struct-device-for-better-packing.patch b/driver-core/driver-core-rearrange-struct-device-for-better-packing.patch deleted file mode 100644 index 96f2c49ebdd5c5..00000000000000 --- a/driver-core/driver-core-rearrange-struct-device-for-better-packing.patch +++ /dev/null @@ -1,47 +0,0 @@ -From matthew@wil.cx Fri Oct 31 09:47:32 2008 -From: Matthew Wilcox <matthew@wil.cx> -Date: Thu, 16 Oct 2008 15:51:35 -0600 -Subject: driver core: Rearrange struct device for better packing -To: Greg KH <greg@kroah.com> -Message-ID: <20081016215135.GS15064@parisc-linux.org> - - - -This minor rearrangement saves 16 bytes from sizeof(struct device) -according to pahole. - -Signed-off-by: Matthew Wilcox <willy@linux.intel.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - include/linux/device.h | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - ---- a/include/linux/device.h -+++ b/include/linux/device.h -@@ -373,9 +373,9 @@ struct device { - - struct kobject kobj; - char bus_id[BUS_ID_SIZE]; /* position on parent bus */ -+ unsigned uevent_suppress:1; - const char *init_name; /* initial name of the device */ - struct device_type *type; -- unsigned uevent_suppress:1; - - struct semaphore sem; /* semaphore to synchronize calls to - * its driver. -@@ -408,12 +408,13 @@ struct device { - /* arch specific additions */ - struct dev_archdata archdata; - -+ dev_t devt; /* dev_t, creates the sysfs "dev" */ -+ - spinlock_t devres_lock; - struct list_head devres_head; - - struct klist_node knode_class; - struct class *class; -- dev_t devt; /* dev_t, creates the sysfs "dev" */ - struct attribute_group **groups; /* optional groups */ - - void (*release)(struct device *dev); diff --git a/driver-core/driver-core-remove-completion-from-struct-klist_node.patch b/driver-core/driver-core-remove-completion-from-struct-klist_node.patch deleted file mode 100644 index a7e75d4be02c71..00000000000000 --- a/driver-core/driver-core-remove-completion-from-struct-klist_node.patch +++ /dev/null @@ -1,118 +0,0 @@ -From matthew@wil.cx Fri Oct 31 09:48:55 2008 -From: Matthew Wilcox <matthew@wil.cx> -Date: Thu, 16 Oct 2008 14:57:54 -0600 -Subject: driver core: Remove completion from struct klist_node -To: Greg KH <greg@kroah.com> -Message-ID: <20081016205754.GR15064@parisc-linux.org> - - -Removing the completion from klist_node reduces its size from 64 bytes -to 28 on x86-64. To maintain the semantics of klist_remove(), we add -a single list of klist nodes which are pending deletion and scan them. - -Signed-off-by: Matthew Wilcox <willy@linux.intel.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - include/linux/klist.h | 2 -- - lib/klist.c | 43 ++++++++++++++++++++++++++++++++++++++++--- - 2 files changed, 40 insertions(+), 5 deletions(-) - ---- a/include/linux/klist.h -+++ b/include/linux/klist.h -@@ -13,7 +13,6 @@ - #define _LINUX_KLIST_H - - #include <linux/spinlock.h> --#include <linux/completion.h> - #include <linux/kref.h> - #include <linux/list.h> - -@@ -41,7 +40,6 @@ struct klist_node { - void *n_klist; /* never access directly */ - struct list_head n_node; - struct kref n_ref; -- struct completion n_removed; - }; - - extern void klist_add_tail(struct klist_node *n, struct klist *k); ---- a/lib/klist.c -+++ b/lib/klist.c -@@ -36,6 +36,7 @@ - - #include <linux/klist.h> - #include <linux/module.h> -+#include <linux/sched.h> - - /* - * Use the lowest bit of n_klist to mark deleted nodes and exclude -@@ -108,7 +109,6 @@ static void add_tail(struct klist *k, st - static void klist_node_init(struct klist *k, struct klist_node *n) - { - INIT_LIST_HEAD(&n->n_node); -- init_completion(&n->n_removed); - kref_init(&n->n_ref); - knode_set_klist(n, k); - if (k->get) -@@ -171,13 +171,34 @@ void klist_add_before(struct klist_node - } - EXPORT_SYMBOL_GPL(klist_add_before); - -+struct klist_waiter { -+ struct list_head list; -+ struct klist_node *node; -+ struct task_struct *process; -+ int woken; -+}; -+ -+static DEFINE_SPINLOCK(klist_remove_lock); -+static LIST_HEAD(klist_remove_waiters); -+ - static void klist_release(struct kref *kref) - { -+ struct klist_waiter *waiter, *tmp; - struct klist_node *n = container_of(kref, struct klist_node, n_ref); - - WARN_ON(!knode_dead(n)); - list_del(&n->n_node); -- complete(&n->n_removed); -+ spin_lock(&klist_remove_lock); -+ list_for_each_entry_safe(waiter, tmp, &klist_remove_waiters, list) { -+ if (waiter->node != n) -+ continue; -+ -+ waiter->woken = 1; -+ mb(); -+ wake_up_process(waiter->process); -+ list_del(&waiter->list); -+ } -+ spin_unlock(&klist_remove_lock); - knode_set_klist(n, NULL); - } - -@@ -217,8 +238,24 @@ EXPORT_SYMBOL_GPL(klist_del); - */ - void klist_remove(struct klist_node *n) - { -+ struct klist_waiter waiter; -+ -+ waiter.node = n; -+ waiter.process = current; -+ waiter.woken = 0; -+ spin_lock(&klist_remove_lock); -+ list_add(&waiter.list, &klist_remove_waiters); -+ spin_unlock(&klist_remove_lock); -+ - klist_del(n); -- wait_for_completion(&n->n_removed); -+ -+ for (;;) { -+ set_current_state(TASK_UNINTERRUPTIBLE); -+ if (waiter.woken) -+ break; -+ schedule(); -+ } -+ __set_current_state(TASK_RUNNING); - } - EXPORT_SYMBOL_GPL(klist_remove); - diff --git a/driver-core/driver-core-struct-device-replace-bus_id-with-dev_name-dev_set_name.patch b/driver-core/driver-core-struct-device-replace-bus_id-with-dev_name-dev_set_name.patch deleted file mode 100644 index 7381ff9bb1f3b3..00000000000000 --- a/driver-core/driver-core-struct-device-replace-bus_id-with-dev_name-dev_set_name.patch +++ /dev/null @@ -1,427 +0,0 @@ -From kay.sievers@vrfy.org Fri Oct 31 10:00:29 2008 -From: Kay Sievers <kay.sievers@vrfy.org> -Date: Thu, 30 Oct 2008 01:36:48 +0100 -Subject: driver core: struct device - replace bus_id with dev_name(), dev_set_name() -To: Greg KH <greg@kroah.com> -Message-ID: <1225327008.5970.27.camel@nga.site> - -From: Kay Sievers <kay.sievers@vrfy.org> - -Subject: driver core: struct device - replace bus_id with dev_name(), dev_set_name() - -Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/base/attribute_container.c | 2 +- - drivers/base/bus.c | 12 ++++++------ - drivers/base/core.c | 36 ++++++++++++++++++------------------ - drivers/base/dd.c | 12 ++++++------ - drivers/base/firmware_class.c | 8 +------- - drivers/base/isa.c | 7 +++---- - drivers/base/platform.c | 15 +++++++-------- - drivers/base/power/main.c | 2 +- - drivers/base/power/trace.c | 4 ++-- - 9 files changed, 45 insertions(+), 53 deletions(-) - ---- a/drivers/base/attribute_container.c -+++ b/drivers/base/attribute_container.c -@@ -167,7 +167,7 @@ attribute_container_add_device(struct de - ic->classdev.parent = get_device(dev); - ic->classdev.class = cont->class; - cont->class->dev_release = attribute_container_release; -- strcpy(ic->classdev.bus_id, dev->bus_id); -+ dev_set_name(&ic->classdev, dev_name(dev)); - if (fn) - fn(cont, dev, &ic->classdev); - else ---- a/drivers/base/bus.c -+++ b/drivers/base/bus.c -@@ -333,7 +333,7 @@ static int match_name(struct device *dev - { - const char *name = data; - -- return sysfs_streq(name, dev->bus_id); -+ return sysfs_streq(name, dev_name(dev)); - } - - /** -@@ -461,12 +461,12 @@ int bus_add_device(struct device *dev) - int error = 0; - - if (bus) { -- pr_debug("bus: '%s': add device %s\n", bus->name, dev->bus_id); -+ pr_debug("bus: '%s': add device %s\n", bus->name, dev_name(dev)); - error = device_add_attrs(bus, dev); - if (error) - goto out_put; - error = sysfs_create_link(&bus->p->devices_kset->kobj, -- &dev->kobj, dev->bus_id); -+ &dev->kobj, dev_name(dev)); - if (error) - goto out_id; - error = sysfs_create_link(&dev->kobj, -@@ -482,7 +482,7 @@ int bus_add_device(struct device *dev) - out_deprecated: - sysfs_remove_link(&dev->kobj, "subsystem"); - out_subsys: -- sysfs_remove_link(&bus->p->devices_kset->kobj, dev->bus_id); -+ sysfs_remove_link(&bus->p->devices_kset->kobj, dev_name(dev)); - out_id: - device_remove_attrs(bus, dev); - out_put: -@@ -526,13 +526,13 @@ void bus_remove_device(struct device *de - sysfs_remove_link(&dev->kobj, "subsystem"); - remove_deprecated_bus_links(dev); - sysfs_remove_link(&dev->bus->p->devices_kset->kobj, -- dev->bus_id); -+ dev_name(dev)); - device_remove_attrs(dev->bus, dev); - if (klist_node_attached(&dev->knode_bus)) - klist_del(&dev->knode_bus); - - pr_debug("bus: '%s': remove device %s\n", -- dev->bus->name, dev->bus_id); -+ dev->bus->name, dev_name(dev)); - device_release_driver(dev); - bus_put(dev->bus); - } ---- a/drivers/base/core.c -+++ b/drivers/base/core.c -@@ -119,7 +119,7 @@ static void device_release(struct kobjec - else - WARN(1, KERN_ERR "Device '%s' does not have a release() " - "function, it is broken and must be fixed.\n", -- dev->bus_id); -+ dev_name(dev)); - } - - static struct kobj_type device_ktype = { -@@ -209,7 +209,7 @@ static int dev_uevent(struct kset *kset, - retval = dev->bus->uevent(dev, env); - if (retval) - pr_debug("device: '%s': %s: bus uevent() returned %d\n", -- dev->bus_id, __func__, retval); -+ dev_name(dev), __func__, retval); - } - - /* have the class specific function add its stuff */ -@@ -217,7 +217,7 @@ static int dev_uevent(struct kset *kset, - retval = dev->class->dev_uevent(dev, env); - if (retval) - pr_debug("device: '%s': %s: class uevent() " -- "returned %d\n", dev->bus_id, -+ "returned %d\n", dev_name(dev), - __func__, retval); - } - -@@ -226,7 +226,7 @@ static int dev_uevent(struct kset *kset, - retval = dev->type->uevent(dev, env); - if (retval) - pr_debug("device: '%s': %s: dev_type uevent() " -- "returned %d\n", dev->bus_id, -+ "returned %d\n", dev_name(dev), - __func__, retval); - } - -@@ -672,7 +672,7 @@ static int device_add_class_symlinks(str - if (dev->kobj.parent != &dev->class->p->class_subsys.kobj && - device_is_not_partition(dev)) { - error = sysfs_create_link(&dev->class->p->class_subsys.kobj, -- &dev->kobj, dev->bus_id); -+ &dev->kobj, dev_name(dev)); - if (error) - goto out_subsys; - } -@@ -712,11 +712,11 @@ out_busid: - if (dev->kobj.parent != &dev->class->p->class_subsys.kobj && - device_is_not_partition(dev)) - sysfs_remove_link(&dev->class->p->class_subsys.kobj, -- dev->bus_id); -+ dev_name(dev)); - #else - /* link in the class directory pointing to the device */ - error = sysfs_create_link(&dev->class->p->class_subsys.kobj, -- &dev->kobj, dev->bus_id); -+ &dev->kobj, dev_name(dev)); - if (error) - goto out_subsys; - -@@ -729,7 +729,7 @@ out_busid: - return 0; - - out_busid: -- sysfs_remove_link(&dev->class->p->class_subsys.kobj, dev->bus_id); -+ sysfs_remove_link(&dev->class->p->class_subsys.kobj, dev_name(dev)); - #endif - - out_subsys: -@@ -758,12 +758,12 @@ static void device_remove_class_symlinks - if (dev->kobj.parent != &dev->class->p->class_subsys.kobj && - device_is_not_partition(dev)) - sysfs_remove_link(&dev->class->p->class_subsys.kobj, -- dev->bus_id); -+ dev_name(dev)); - #else - if (dev->parent && device_is_not_partition(dev)) - sysfs_remove_link(&dev->kobj, "device"); - -- sysfs_remove_link(&dev->class->p->class_subsys.kobj, dev->bus_id); -+ sysfs_remove_link(&dev->class->p->class_subsys.kobj, dev_name(dev)); - #endif - - sysfs_remove_link(&dev->kobj, "subsystem"); -@@ -866,7 +866,7 @@ int device_add(struct device *dev) - if (!strlen(dev->bus_id)) - goto done; - -- pr_debug("device: '%s': %s\n", dev->bus_id, __func__); -+ pr_debug("device: '%s': %s\n", dev_name(dev), __func__); - - parent = get_device(dev->parent); - setup_parent(dev, parent); -@@ -876,7 +876,7 @@ int device_add(struct device *dev) - set_dev_node(dev, dev_to_node(parent)); - - /* first, register with generic layer. */ -- error = kobject_add(&dev->kobj, dev->kobj.parent, "%s", dev->bus_id); -+ error = kobject_add(&dev->kobj, dev->kobj.parent, "%s", dev_name(dev)); - if (error) - goto Error; - -@@ -1086,7 +1086,7 @@ void device_del(struct device *dev) - */ - void device_unregister(struct device *dev) - { -- pr_debug("device: '%s': %s\n", dev->bus_id, __func__); -+ pr_debug("device: '%s': %s\n", dev_name(dev), __func__); - device_del(dev); - put_device(dev); - } -@@ -1199,7 +1199,7 @@ EXPORT_SYMBOL_GPL(device_remove_file); - - static void device_create_release(struct device *dev) - { -- pr_debug("device: '%s': %s\n", dev->bus_id, __func__); -+ pr_debug("device: '%s': %s\n", dev_name(dev), __func__); - kfree(dev); - } - -@@ -1344,7 +1344,7 @@ int device_rename(struct device *dev, ch - if (!dev) - return -EINVAL; - -- pr_debug("device: '%s': %s: renaming to '%s'\n", dev->bus_id, -+ pr_debug("device: '%s': %s: renaming to '%s'\n", dev_name(dev), - __func__, new_name); - - #ifdef CONFIG_SYSFS_DEPRECATED -@@ -1381,7 +1381,7 @@ int device_rename(struct device *dev, ch - #else - if (dev->class) { - error = sysfs_create_link_nowarn(&dev->class->p->class_subsys.kobj, -- &dev->kobj, dev->bus_id); -+ &dev->kobj, dev_name(dev)); - if (error) - goto out; - sysfs_remove_link(&dev->class->p->class_subsys.kobj, -@@ -1459,8 +1459,8 @@ int device_move(struct device *dev, stru - new_parent = get_device(new_parent); - new_parent_kobj = get_device_parent(dev, new_parent); - -- pr_debug("device: '%s': %s: moving to '%s'\n", dev->bus_id, -- __func__, new_parent ? new_parent->bus_id : "<NULL>"); -+ pr_debug("device: '%s': %s: moving to '%s'\n", dev_name(dev), -+ __func__, new_parent ? dev_name(new_parent) : "<NULL>"); - error = kobject_move(&dev->kobj, new_parent_kobj); - if (error) { - cleanup_glue_dir(dev, new_parent_kobj); ---- a/drivers/base/dd.c -+++ b/drivers/base/dd.c -@@ -34,7 +34,7 @@ static void driver_bound(struct device * - return; - } - -- pr_debug("driver: '%s': %s: bound to device '%s'\n", dev->bus_id, -+ pr_debug("driver: '%s': %s: bound to device '%s'\n", dev_name(dev), - __func__, dev->driver->name); - - if (dev->bus) -@@ -104,13 +104,13 @@ static int really_probe(struct device *d - - atomic_inc(&probe_count); - pr_debug("bus: '%s': %s: probing driver %s with device %s\n", -- drv->bus->name, __func__, drv->name, dev->bus_id); -+ drv->bus->name, __func__, drv->name, dev_name(dev)); - WARN_ON(!list_empty(&dev->devres_head)); - - dev->driver = drv; - if (driver_sysfs_add(dev)) { - printk(KERN_ERR "%s: driver_sysfs_add(%s) failed\n", -- __func__, dev->bus_id); -+ __func__, dev_name(dev)); - goto probe_failed; - } - -@@ -127,7 +127,7 @@ static int really_probe(struct device *d - driver_bound(dev); - ret = 1; - pr_debug("bus: '%s': %s: bound device %s to driver %s\n", -- drv->bus->name, __func__, dev->bus_id, drv->name); -+ drv->bus->name, __func__, dev_name(dev), drv->name); - goto done; - - probe_failed: -@@ -139,7 +139,7 @@ probe_failed: - /* driver matched but the probe failed */ - printk(KERN_WARNING - "%s: probe of %s failed with error %d\n", -- drv->name, dev->bus_id, ret); -+ drv->name, dev_name(dev), ret); - } - /* - * Ignore errors returned by ->probe so that the next driver can try -@@ -194,7 +194,7 @@ int driver_probe_device(struct device_dr - goto done; - - pr_debug("bus: '%s': %s: matched device %s with driver %s\n", -- drv->bus->name, __func__, dev->bus_id, drv->name); -+ drv->bus->name, __func__, dev_name(dev), drv->name); - - ret = really_probe(dev, drv); - ---- a/drivers/base/firmware_class.c -+++ b/drivers/base/firmware_class.c -@@ -291,12 +291,6 @@ firmware_class_timeout(u_long data) - fw_load_abort(fw_priv); - } - --static inline void fw_setup_device_id(struct device *f_dev, struct device *dev) --{ -- /* XXX warning we should watch out for name collisions */ -- strlcpy(f_dev->bus_id, dev->bus_id, BUS_ID_SIZE); --} -- - static int fw_register_device(struct device **dev_p, const char *fw_name, - struct device *device) - { -@@ -321,7 +315,7 @@ static int fw_register_device(struct dev - fw_priv->timeout.data = (u_long) fw_priv; - init_timer(&fw_priv->timeout); - -- fw_setup_device_id(f_dev, device); -+ dev_set_name(f_dev, dev_name(device)); - f_dev->parent = device; - f_dev->class = &firmware_class; - dev_set_drvdata(f_dev, fw_priv); ---- a/drivers/base/isa.c -+++ b/drivers/base/isa.c -@@ -11,7 +11,7 @@ - #include <linux/isa.h> - - static struct device isa_bus = { -- .bus_id = "isa" -+ .init_name = "isa" - }; - - struct isa_dev { -@@ -135,9 +135,8 @@ int isa_register_driver(struct isa_drive - isa_dev->dev.parent = &isa_bus; - isa_dev->dev.bus = &isa_bus_type; - -- snprintf(isa_dev->dev.bus_id, BUS_ID_SIZE, "%s.%u", -- isa_driver->driver.name, id); -- -+ dev_set_name(&isa_dev->dev, "%s.%u", -+ isa_driver->driver.name, id); - isa_dev->dev.platform_data = isa_driver; - isa_dev->dev.release = isa_dev_release; - isa_dev->id = id; ---- a/drivers/base/platform.c -+++ b/drivers/base/platform.c -@@ -24,7 +24,7 @@ - driver)) - - struct device platform_bus = { -- .bus_id = "platform", -+ .init_name = "platform", - }; - EXPORT_SYMBOL_GPL(platform_bus); - -@@ -242,16 +242,15 @@ int platform_device_add(struct platform_ - pdev->dev.bus = &platform_bus_type; - - if (pdev->id != -1) -- snprintf(pdev->dev.bus_id, BUS_ID_SIZE, "%s.%d", pdev->name, -- pdev->id); -+ dev_set_name(&pdev->dev, "%s.%d", pdev->name, pdev->id); - else -- strlcpy(pdev->dev.bus_id, pdev->name, BUS_ID_SIZE); -+ dev_set_name(&pdev->dev, pdev->name); - - for (i = 0; i < pdev->num_resources; i++) { - struct resource *p, *r = &pdev->resource[i]; - - if (r->name == NULL) -- r->name = pdev->dev.bus_id; -+ r->name = dev_name(&pdev->dev); - - p = r->parent; - if (!p) { -@@ -264,14 +263,14 @@ int platform_device_add(struct platform_ - if (p && insert_resource(p, r)) { - printk(KERN_ERR - "%s: failed to claim resource %d\n", -- pdev->dev.bus_id, i); -+ dev_name(&pdev->dev), i); - ret = -EBUSY; - goto failed; - } - } - - pr_debug("Registering platform device '%s'. Parent at %s\n", -- pdev->dev.bus_id, pdev->dev.parent->bus_id); -+ dev_name(&pdev->dev), dev_name(pdev->dev.parent)); - - ret = device_add(&pdev->dev); - if (ret == 0) -@@ -607,7 +606,7 @@ static int platform_match(struct device - struct platform_device *pdev; - - pdev = container_of(dev, struct platform_device, dev); -- return (strncmp(pdev->name, drv->name, BUS_ID_SIZE) == 0); -+ return (strcmp(pdev->name, drv->name) == 0); - } - - #ifdef CONFIG_PM_SLEEP ---- a/drivers/base/power/main.c -+++ b/drivers/base/power/main.c -@@ -76,7 +76,7 @@ void device_pm_add(struct device *dev) - if (dev->parent) { - if (dev->parent->power.status >= DPM_SUSPENDING) - dev_warn(dev, "parent %s should not be sleeping\n", -- dev->parent->bus_id); -+ dev_name(dev->parent)); - } else if (transition_started) { - /* - * We refuse to register parentless devices while a PM ---- a/drivers/base/power/trace.c -+++ b/drivers/base/power/trace.c -@@ -140,7 +140,7 @@ static unsigned int hash_string(unsigned - - void set_trace_device(struct device *dev) - { -- dev_hash_value = hash_string(DEVSEED, dev->bus_id, DEVHASH); -+ dev_hash_value = hash_string(DEVSEED, dev_name(dev), DEVHASH); - } - EXPORT_SYMBOL(set_trace_device); - -@@ -192,7 +192,7 @@ static int show_dev_hash(unsigned int va - - while (entry != &dpm_list) { - struct device * dev = to_device(entry); -- unsigned int hash = hash_string(DEVSEED, dev->bus_id, DEVHASH); -+ unsigned int hash = hash_string(DEVSEED, dev_name(dev), DEVHASH); - if (hash == value) { - dev_info(dev, "hash matches\n"); - match++; diff --git a/driver-core/dynamic_printk-reduce-one-level-of-indentation.patch b/driver-core/dynamic_printk-reduce-one-level-of-indentation.patch deleted file mode 100644 index 58542dfac97a08..00000000000000 --- a/driver-core/dynamic_printk-reduce-one-level-of-indentation.patch +++ /dev/null @@ -1,88 +0,0 @@ -From fengguang.wu@intel.com Fri Dec 12 11:08:41 2008 -From: Wu Fengguang <fengguang.wu@intel.com> -Date: Thu, 11 Dec 2008 07:43:17 +0800 -Subject: dynamic_printk: reduce one level of indentation -To: Greg KH <gregkh@suse.de> -Cc: Marcel Holtmann <marcel@holtmann.org>, Jason Baron <jbaron@redhat.com> -Message-ID: <20081210234317.GA5904@localhost> - -Cleanup pr_debug_write() to reduce one level of indentation. - -Cc: Marcel Holtmann <marcel@holtmann.org> -Acked-by: Jason Baron <jbaron@redhat.com> -Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - lib/dynamic_printk.c | 58 ++++++++++++++++++++++----------------------------- - 1 file changed, 26 insertions(+), 32 deletions(-) - ---- a/lib/dynamic_printk.c -+++ b/lib/dynamic_printk.c -@@ -277,40 +277,34 @@ static ssize_t pr_debug_write(struct fil - dynamic_enabled = DYNAMIC_ENABLED_NONE; - } - err = 0; -- } else { -- if (elem) { -- if (value && (elem->enable == 0)) { -- dynamic_printk_enabled |= -- (1LL << elem->hash1); -- dynamic_printk_enabled2 |= -- (1LL << elem->hash2); -- elem->enable = 1; -- num_enabled++; -- dynamic_enabled = DYNAMIC_ENABLED_SOME; -- err = 0; -- printk(KERN_DEBUG -- "debugging enabled for module %s\n", -- elem->name); -- } else if (!value && (elem->enable == 1)) { -- elem->enable = 0; -- num_enabled--; -- if (disabled_hash(elem->hash1, true)) -- dynamic_printk_enabled &= -+ } else if (elem) { -+ if (value && (elem->enable == 0)) { -+ dynamic_printk_enabled |= (1LL << elem->hash1); -+ dynamic_printk_enabled2 |= (1LL << elem->hash2); -+ elem->enable = 1; -+ num_enabled++; -+ dynamic_enabled = DYNAMIC_ENABLED_SOME; -+ err = 0; -+ printk(KERN_DEBUG -+ "debugging enabled for module %s\n", -+ elem->name); -+ } else if (!value && (elem->enable == 1)) { -+ elem->enable = 0; -+ num_enabled--; -+ if (disabled_hash(elem->hash1, true)) -+ dynamic_printk_enabled &= - ~(1LL << elem->hash1); -- if (disabled_hash(elem->hash2, false)) -- dynamic_printk_enabled2 &= -+ if (disabled_hash(elem->hash2, false)) -+ dynamic_printk_enabled2 &= - ~(1LL << elem->hash2); -- if (num_enabled) -- dynamic_enabled = -- DYNAMIC_ENABLED_SOME; -- else -- dynamic_enabled = -- DYNAMIC_ENABLED_NONE; -- err = 0; -- printk(KERN_DEBUG -- "debugging disabled for module " -- "%s\n", elem->name); -- } -+ if (num_enabled) -+ dynamic_enabled = DYNAMIC_ENABLED_SOME; -+ else -+ dynamic_enabled = DYNAMIC_ENABLED_NONE; -+ err = 0; -+ printk(KERN_DEBUG -+ "debugging disabled for module %s\n", -+ elem->name); - } - } - } diff --git a/driver-core/fix-misspellings-in-pm.h-macros.patch b/driver-core/fix-misspellings-in-pm.h-macros.patch deleted file mode 100644 index b9cc4c78019001..00000000000000 --- a/driver-core/fix-misspellings-in-pm.h-macros.patch +++ /dev/null @@ -1,51 +0,0 @@ -From stern@rowland.harvard.edu Mon Nov 17 15:02:22 2008 -From: Alan Stern <stern@rowland.harvard.edu> -Date: Mon, 17 Nov 2008 11:14:19 -0500 (EST) -Subject: Fix misspellings in pm.h macros -To: Greg KH <greg@kroah.com> -Cc: "Rafael J. Wysocki" <rjw@sisk.pl>, Linux-pm mailing list <linux-pm@lists.linux-foundation.org> -Message-ID: <Pine.LNX.4.44L0.0811171111050.5170-100000@iolanthe.rowland.org> - - -This patch (as1167) fixes some misspellings in various recently-added -macros in pm.h. Fortunately these macros are not yet used anywhere. - -Signed-off-by: Alan Stern <stern@rowland.harvard.edu> -Acked-by: Rafael J. Wysocki <rjw@sisk.pl> - ---- - include/linux/pm.h | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - ---- a/include/linux/pm.h -+++ b/include/linux/pm.h -@@ -252,7 +252,7 @@ struct dev_pm_ops { - #define PM_EVENT_SLEEP (PM_EVENT_SUSPEND | PM_EVENT_HIBERNATE) - #define PM_EVENT_USER_SUSPEND (PM_EVENT_USER | PM_EVENT_SUSPEND) - #define PM_EVENT_USER_RESUME (PM_EVENT_USER | PM_EVENT_RESUME) --#define PM_EVENT_REMOTE_WAKEUP (PM_EVENT_REMOTE | PM_EVENT_RESUME) -+#define PM_EVENT_REMOTE_RESUME (PM_EVENT_REMOTE | PM_EVENT_RESUME) - #define PM_EVENT_AUTO_SUSPEND (PM_EVENT_AUTO | PM_EVENT_SUSPEND) - #define PM_EVENT_AUTO_RESUME (PM_EVENT_AUTO | PM_EVENT_RESUME) - -@@ -265,15 +265,15 @@ struct dev_pm_ops { - #define PMSG_THAW ((struct pm_message){ .event = PM_EVENT_THAW, }) - #define PMSG_RESTORE ((struct pm_message){ .event = PM_EVENT_RESTORE, }) - #define PMSG_RECOVER ((struct pm_message){ .event = PM_EVENT_RECOVER, }) --#define PMSG_USER_SUSPEND ((struct pm_messge) \ -+#define PMSG_USER_SUSPEND ((struct pm_message) \ - { .event = PM_EVENT_USER_SUSPEND, }) --#define PMSG_USER_RESUME ((struct pm_messge) \ -+#define PMSG_USER_RESUME ((struct pm_message) \ - { .event = PM_EVENT_USER_RESUME, }) --#define PMSG_REMOTE_RESUME ((struct pm_messge) \ -+#define PMSG_REMOTE_RESUME ((struct pm_message) \ - { .event = PM_EVENT_REMOTE_RESUME, }) --#define PMSG_AUTO_SUSPEND ((struct pm_messge) \ -+#define PMSG_AUTO_SUSPEND ((struct pm_message) \ - { .event = PM_EVENT_AUTO_SUSPEND, }) --#define PMSG_AUTO_RESUME ((struct pm_messge) \ -+#define PMSG_AUTO_RESUME ((struct pm_message) \ - { .event = PM_EVENT_AUTO_RESUME, }) - - /** diff --git a/driver-core/kernel-ksysfs.c-fix-dependence-on-config_net.patch b/driver-core/kernel-ksysfs.c-fix-dependence-on-config_net.patch deleted file mode 100644 index 45bcff7a8abc25..00000000000000 --- a/driver-core/kernel-ksysfs.c-fix-dependence-on-config_net.patch +++ /dev/null @@ -1,42 +0,0 @@ -From tom.leiming@gmail.com Mon Nov 17 16:32:45 2008 -From: tom.leiming@gmail.com -Date: Sun, 16 Nov 2008 18:22:09 +0800 -Subject: kernel/ksysfs.c:fix dependence on CONFIG_NET -To: kay.sievers@vrfy.org, greg@kroah.com -Cc: Ming Lei <tom.leiming@gmail.com> -Message-ID: <1226830929-6610-1-git-send-email-tom.leiming@gmail.com> - - -From: Ming Lei <tom.leiming@gmail.com> - -Access to uevent_seqnum and uevent_helper does not need to -depend on CONFIG_NET, so remove it. - -Signed-off-by: Ming Lei <tom.leiming@gmail.com> -Cc: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - kernel/ksysfs.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/kernel/ksysfs.c -+++ b/kernel/ksysfs.c -@@ -24,7 +24,7 @@ static struct kobj_attribute _name##_att - static struct kobj_attribute _name##_attr = \ - __ATTR(_name, 0644, _name##_show, _name##_store) - --#if defined(CONFIG_HOTPLUG) && defined(CONFIG_NET) -+#if defined(CONFIG_HOTPLUG) - /* current uevent sequence number */ - static ssize_t uevent_seqnum_show(struct kobject *kobj, - struct kobj_attribute *attr, char *buf) -@@ -137,7 +137,7 @@ struct kobject *kernel_kobj; - EXPORT_SYMBOL_GPL(kernel_kobj); - - static struct attribute * kernel_attrs[] = { --#if defined(CONFIG_HOTPLUG) && defined(CONFIG_NET) -+#if defined(CONFIG_HOTPLUG) - &uevent_seqnum_attr.attr, - &uevent_helper_attr.attr, - #endif diff --git a/driver-core/kobject-make-documentation-kobject.txt-a-little-more-coherent.patch b/driver-core/kobject-make-documentation-kobject.txt-a-little-more-coherent.patch deleted file mode 100644 index 389d637e035a37..00000000000000 --- a/driver-core/kobject-make-documentation-kobject.txt-a-little-more-coherent.patch +++ /dev/null @@ -1,40 +0,0 @@ -From rusty@rustcorp.com.au Tue Dec 9 20:18:11 2008 -From: Rusty Russell <rusty@rustcorp.com.au> -Date: Tue, 9 Dec 2008 08:32:14 +1030 -Subject: kobject: Make Documentation/kobject.txt a little more coherent. -To: "Eric W. Biederman" <ebiederm@xmission.com> -Cc: Greg KH <gregkh@suse.de> -Message-ID: <200812090832.20403.rusty@rustcorp.com.au> -Content-Disposition: inline - - -While reading Documentation/kobject.txt: - - Note kobject_rename does perform any locking or have a solid notion of - what names are valid so the provide must provide their own sanity checking - and serialization. - -I expect better: You never see me hard with time word making sentence -coherent stuff. Ever. - -Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> -Acked-by: Eric W. Biederman <ebiederm@xmission.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - Documentation/kobject.txt | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/Documentation/kobject.txt -+++ b/Documentation/kobject.txt -@@ -118,8 +118,8 @@ the name of the kobject, call kobject_re - - int kobject_rename(struct kobject *kobj, const char *new_name); - --Note kobject_rename does perform any locking or have a solid notion of --what names are valid so the provide must provide their own sanity checking -+kobject_rename does not perform any locking or have a solid notion of -+what names are valid so the caller must provide their own sanity checking - and serialization. - - There is a function called kobject_set_name() but that is legacy cruft and diff --git a/driver-core/kobject-return-the-result-of-uevent-sending-by-netlink.patch b/driver-core/kobject-return-the-result-of-uevent-sending-by-netlink.patch deleted file mode 100644 index 9b909bf67a388d..00000000000000 --- a/driver-core/kobject-return-the-result-of-uevent-sending-by-netlink.patch +++ /dev/null @@ -1,38 +0,0 @@ -From tom.leiming@gmail.com Mon Nov 17 16:32:04 2008 -From: tom.leiming@gmail.com -Date: Sun, 16 Nov 2008 18:23:27 +0800 -Subject: kobject: return the result of uevent sending by netlink -To: greg@kroah.com -Cc: Ming Lei <tom.leiming@gmail.com> -Message-ID: <1226831007-6639-1-git-send-email-tom.leiming@gmail.com> - - -From: Ming Lei <tom.leiming@gmail.com> - -We need to return the result of uevent sending by netlink -to caller, when uevent_helper is disabled and CONFIG_NET -is defined. - -Signed-off-by: Ming Lei <tom.leiming@gmail.com> -Cc: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - lib/kobject_uevent.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - ---- a/lib/kobject_uevent.c -+++ b/lib/kobject_uevent.c -@@ -225,8 +225,10 @@ int kobject_uevent_env(struct kobject *k - } - - NETLINK_CB(skb).dst_group = 1; -- netlink_broadcast(uevent_sock, skb, 0, 1, GFP_KERNEL); -- } -+ retval = netlink_broadcast(uevent_sock, skb, 0, 1, -+ GFP_KERNEL); -+ } else -+ retval = -ENOMEM; - } - #endif - diff --git a/driver-core/lguest-do-not-statically-allocate-root-device.patch b/driver-core/lguest-do-not-statically-allocate-root-device.patch deleted file mode 100644 index 62378d0cbe4d83..00000000000000 --- a/driver-core/lguest-do-not-statically-allocate-root-device.patch +++ /dev/null @@ -1,54 +0,0 @@ -From markmc@redhat.com Thu Dec 18 16:17:48 2008 -From: Mark McLoughlin <markmc@redhat.com> -Date: Mon, 15 Dec 2008 12:58:28 +0000 -Subject: lguest: do not statically allocate root device -To: Greg KH <gregkh@suse.de> -Cc: Rusty Russell <rusty@rustcorp.com.au>, Anthony Liguori <aliguori@us.ibm.com>, Kay Sievers <kay.sievers@vrfy.org>, Cornelia Huck <cornelia.huck@de.ibm.com>, Mark McLoughlin <markmc@redhat.com> -Message-ID: <1229345909-27229-3-git-send-email-markmc@redhat.com> - - -We shouldn't be statically allocating the root device object, -so dynamically allocate it using root_device_register() -instead. - -Signed-off-by: Mark McLoughlin <markmc@redhat.com> -Acked-by: Rusty Russell <rusty@rustcorp.com.au> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/lguest/lguest_device.c | 10 ++++------ - 1 file changed, 4 insertions(+), 6 deletions(-) - ---- a/drivers/lguest/lguest_device.c -+++ b/drivers/lguest/lguest_device.c -@@ -321,10 +321,7 @@ static struct virtio_config_ops lguest_c - - /* The root device for the lguest virtio devices. This makes them appear as - * /sys/devices/lguest/0,1,2 not /sys/devices/0,1,2. */ --static struct device lguest_root = { -- .parent = NULL, -- .bus_id = "lguest", --}; -+static struct device *lguest_root; - - /*D:120 This is the core of the lguest bus: actually adding a new device. - * It's a separate function because it's neater that way, and because an -@@ -351,7 +348,7 @@ static void add_lguest_device(struct lgu - } - - /* This devices' parent is the lguest/ dir. */ -- ldev->vdev.dev.parent = &lguest_root; -+ ldev->vdev.dev.parent = lguest_root; - /* We have a unique device index thanks to the dev_index counter. */ - ldev->vdev.id.device = d->type; - /* We have a simple set of routines for querying the device's -@@ -407,7 +404,8 @@ static int __init lguest_devices_init(vo - if (strcmp(pv_info.name, "lguest") != 0) - return 0; - -- if (device_register(&lguest_root) != 0) -+ lguest_root = root_device_register("lguest"); -+ if (IS_ERR(lguest_root)) - panic("Could not register lguest root"); - - /* Devices are in a single page above top of "normal" mem */ diff --git a/driver-core/make-debug-take-precedence-over-dynamic_printk_debug.patch b/driver-core/make-debug-take-precedence-over-dynamic_printk_debug.patch deleted file mode 100644 index 194828879430f8..00000000000000 --- a/driver-core/make-debug-take-precedence-over-dynamic_printk_debug.patch +++ /dev/null @@ -1,65 +0,0 @@ -From cornelia.huck@de.ibm.com Tue Dec 16 14:36:28 2008 -From: Cornelia Huck <cornelia.huck@de.ibm.com> -Date: Thu, 4 Dec 2008 16:55:47 +0100 -Subject: Make DEBUG take precedence over DYNAMIC_PRINTK_DEBUG -To: Jason Baron <jbaron@redhat.com> -Cc: Greg K-H <greg@kroah.com> -Message-ID: <20081204165547.4787d1e9@gondolin> - -From: Cornelia Huck <cornelia.huck@de.ibm.com> - -Statically defined DEBUG should take precedence over -dynamically enabled debugging; otherwise adding DEBUG -(like, for example, via CONFIG_DEBUG_KOBJECT) does not -have the expected result of printing pr_debug() and dev_dbg() -messages unconditionally. - -Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> -Acked-by: Jason Baron <jbaron@redhat.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - include/linux/device.h | 8 ++++---- - include/linux/kernel.h | 8 ++++---- - 2 files changed, 8 insertions(+), 8 deletions(-) - ---- a/include/linux/device.h -+++ b/include/linux/device.h -@@ -553,13 +553,13 @@ extern const char *dev_driver_string(con - #define dev_info(dev, format, arg...) \ - dev_printk(KERN_INFO , dev , format , ## arg) - --#if defined(CONFIG_DYNAMIC_PRINTK_DEBUG) -+#if defined(DEBUG) -+#define dev_dbg(dev, format, arg...) \ -+ dev_printk(KERN_DEBUG , dev , format , ## arg) -+#elif defined(CONFIG_DYNAMIC_PRINTK_DEBUG) - #define dev_dbg(dev, format, ...) do { \ - dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \ - } while (0) --#elif defined(DEBUG) --#define dev_dbg(dev, format, arg...) \ -- dev_printk(KERN_DEBUG , dev , format , ## arg) - #else - #define dev_dbg(dev, format, arg...) \ - ({ if (0) dev_printk(KERN_DEBUG, dev, format, ##arg); 0; }) ---- a/include/linux/kernel.h -+++ b/include/linux/kernel.h -@@ -349,13 +349,13 @@ static inline char *pack_hex_byte(char * - printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) - - /* If you are writing a driver, please use dev_dbg instead */ --#if defined(CONFIG_DYNAMIC_PRINTK_DEBUG) -+#if defined(DEBUG) -+#define pr_debug(fmt, ...) \ -+ printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) -+#elif defined(CONFIG_DYNAMIC_PRINTK_DEBUG) - #define pr_debug(fmt, ...) do { \ - dynamic_pr_debug(pr_fmt(fmt), ##__VA_ARGS__); \ - } while (0) --#elif defined(DEBUG) --#define pr_debug(fmt, ...) \ -- printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) - #else - #define pr_debug(fmt, ...) \ - ({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; }) diff --git a/driver-core/pci-rework-default-handling-of-suspend-and-resume.patch b/driver-core/pci-rework-default-handling-of-suspend-and-resume.patch deleted file mode 100644 index 5f38d53a3582f6..00000000000000 --- a/driver-core/pci-rework-default-handling-of-suspend-and-resume.patch +++ /dev/null @@ -1,297 +0,0 @@ -From rjw@sisk.pl Tue Dec 9 20:28:08 2008 -From: Rafael J. Wysocki <rjw@sisk.pl> -Date: Mon, 8 Dec 2008 00:34:57 +0100 -Subject: PCI: Rework default handling of suspend and resume -To: Greg KH <greg@kroah.com> -Cc: Linus Torvalds <torvalds@linux-foundation.org>, Ingo Molnar <mingo@elte.hu>, Jesse Barnes <jbarnes@virtuousgeek.org>, Len Brown <lenb@kernel.org>, Takashi Iwai <tiwai@suse.de>, Andrew Morton <akpm@linux-foundation.org> -Message-ID: <200812080034.58106.rjw@sisk.pl> -Content-Disposition: inline - -From: Rafael J. Wysocki <rjw@sisk.pl> - -Rework the handling of suspend and resume of PCI devices which have -no drivers or the drivers of which do not provide any suspend-resume -callbacks in such a way that their standard PCI configuration -registers will be saved and restored with interrupts disabled. This -should prevent such devices, including PCI bridges, from being -resumed too late to be able to function correctly during the resume -of the other PCI devices that may depend on them. - -Also, to remove one possible source of future confusion, drop the -default handling of suspend and resume for PCI devices with drivers -providing the 'pm' object introduced by the new suspend-resume -framework (there are no such PCI drivers at the moment). - -This patch addresses the regression from 2.6.26 tracked as -http://bugzilla.kernel.org/show_bug.cgi?id=12121 . - -Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> -Cc: Jesse Barnes <jbarnes@virtuousgeek.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/pci/pci-driver.c | 94 +++++++++++++++++++++++++++++++---------------- - 1 file changed, 63 insertions(+), 31 deletions(-) - ---- a/drivers/pci/pci-driver.c -+++ b/drivers/pci/pci-driver.c -@@ -300,6 +300,14 @@ static void pci_device_shutdown(struct d - - #ifdef CONFIG_PM_SLEEP - -+static bool pci_has_legacy_pm_support(struct pci_dev *pci_dev) -+{ -+ struct pci_driver *drv = pci_dev->driver; -+ -+ return drv && (drv->suspend || drv->suspend_late || drv->resume -+ || drv->resume_early); -+} -+ - /* - * Default "suspend" method for devices that have no driver provided suspend, - * or not even a driver at all. -@@ -317,14 +325,22 @@ static void pci_default_pm_suspend(struc - - /* - * Default "resume" method for devices that have no driver provided resume, -- * or not even a driver at all. -+ * or not even a driver at all (first part). - */ --static int pci_default_pm_resume(struct pci_dev *pci_dev) -+static void pci_default_pm_resume_early(struct pci_dev *pci_dev) - { -- int retval = 0; -- - /* restore the PCI config space */ - pci_restore_state(pci_dev); -+} -+ -+/* -+ * Default "resume" method for devices that have no driver provided resume, -+ * or not even a driver at all (second part). -+ */ -+static int pci_default_pm_resume_late(struct pci_dev *pci_dev) -+{ -+ int retval; -+ - /* if the device was enabled before suspend, reenable */ - retval = pci_reenable_device(pci_dev); - /* -@@ -371,10 +387,12 @@ static int pci_legacy_resume(struct devi - struct pci_dev * pci_dev = to_pci_dev(dev); - struct pci_driver * drv = pci_dev->driver; - -- if (drv && drv->resume) -+ if (drv && drv->resume) { - error = drv->resume(pci_dev); -- else -- error = pci_default_pm_resume(pci_dev); -+ } else { -+ pci_default_pm_resume_early(pci_dev); -+ error = pci_default_pm_resume_late(pci_dev); -+ } - return error; - } - -@@ -420,10 +438,8 @@ static int pci_pm_suspend(struct device - if (drv->pm->suspend) { - error = drv->pm->suspend(dev); - suspend_report_result(drv->pm->suspend, error); -- } else { -- pci_default_pm_suspend(pci_dev); - } -- } else { -+ } else if (pci_has_legacy_pm_support(pci_dev)) { - error = pci_legacy_suspend(dev, PMSG_SUSPEND); - } - pci_fixup_device(pci_fixup_suspend, pci_dev); -@@ -433,6 +449,7 @@ static int pci_pm_suspend(struct device - - static int pci_pm_suspend_noirq(struct device *dev) - { -+ struct pci_dev *pci_dev = to_pci_dev(dev); - struct device_driver *drv = dev->driver; - int error = 0; - -@@ -441,8 +458,10 @@ static int pci_pm_suspend_noirq(struct d - error = drv->pm->suspend_noirq(dev); - suspend_report_result(drv->pm->suspend_noirq, error); - } -- } else { -+ } else if (pci_has_legacy_pm_support(pci_dev)) { - error = pci_legacy_suspend_late(dev, PMSG_SUSPEND); -+ } else { -+ pci_default_pm_suspend(pci_dev); - } - - return error; -@@ -452,15 +471,17 @@ static int pci_pm_resume(struct device * - { - struct pci_dev *pci_dev = to_pci_dev(dev); - struct device_driver *drv = dev->driver; -- int error; -+ int error = 0; - - pci_fixup_device(pci_fixup_resume, pci_dev); - - if (drv && drv->pm) { -- error = drv->pm->resume ? drv->pm->resume(dev) : -- pci_default_pm_resume(pci_dev); -- } else { -+ if (drv->pm->resume) -+ error = drv->pm->resume(dev); -+ } else if (pci_has_legacy_pm_support(pci_dev)) { - error = pci_legacy_resume(dev); -+ } else { -+ error = pci_default_pm_resume_late(pci_dev); - } - - return error; -@@ -468,6 +489,7 @@ static int pci_pm_resume(struct device * - - static int pci_pm_resume_noirq(struct device *dev) - { -+ struct pci_dev *pci_dev = to_pci_dev(dev); - struct device_driver *drv = dev->driver; - int error = 0; - -@@ -476,8 +498,10 @@ static int pci_pm_resume_noirq(struct de - if (drv && drv->pm) { - if (drv->pm->resume_noirq) - error = drv->pm->resume_noirq(dev); -- } else { -+ } else if (pci_has_legacy_pm_support(pci_dev)) { - error = pci_legacy_resume_early(dev); -+ } else { -+ pci_default_pm_resume_early(pci_dev); - } - - return error; -@@ -504,10 +528,8 @@ static int pci_pm_freeze(struct device * - if (drv->pm->freeze) { - error = drv->pm->freeze(dev); - suspend_report_result(drv->pm->freeze, error); -- } else { -- pci_default_pm_suspend(pci_dev); - } -- } else { -+ } else if (pci_has_legacy_pm_support(pci_dev)) { - error = pci_legacy_suspend(dev, PMSG_FREEZE); - pci_fixup_device(pci_fixup_suspend, pci_dev); - } -@@ -517,6 +539,7 @@ static int pci_pm_freeze(struct device * - - static int pci_pm_freeze_noirq(struct device *dev) - { -+ struct pci_dev *pci_dev = to_pci_dev(dev); - struct device_driver *drv = dev->driver; - int error = 0; - -@@ -525,8 +548,10 @@ static int pci_pm_freeze_noirq(struct de - error = drv->pm->freeze_noirq(dev); - suspend_report_result(drv->pm->freeze_noirq, error); - } -- } else { -+ } else if (pci_has_legacy_pm_support(pci_dev)) { - error = pci_legacy_suspend_late(dev, PMSG_FREEZE); -+ } else { -+ pci_default_pm_suspend(pci_dev); - } - - return error; -@@ -534,14 +559,15 @@ static int pci_pm_freeze_noirq(struct de - - static int pci_pm_thaw(struct device *dev) - { -+ struct pci_dev *pci_dev = to_pci_dev(dev); - struct device_driver *drv = dev->driver; - int error = 0; - - if (drv && drv->pm) { - if (drv->pm->thaw) - error = drv->pm->thaw(dev); -- } else { -- pci_fixup_device(pci_fixup_resume, to_pci_dev(dev)); -+ } else if (pci_has_legacy_pm_support(pci_dev)) { -+ pci_fixup_device(pci_fixup_resume, pci_dev); - error = pci_legacy_resume(dev); - } - -@@ -550,13 +576,14 @@ static int pci_pm_thaw(struct device *de - - static int pci_pm_thaw_noirq(struct device *dev) - { -+ struct pci_dev *pci_dev = to_pci_dev(dev); - struct device_driver *drv = dev->driver; - int error = 0; - - if (drv && drv->pm) { - if (drv->pm->thaw_noirq) - error = drv->pm->thaw_noirq(dev); -- } else { -+ } else if (pci_has_legacy_pm_support(pci_dev)) { - pci_fixup_device(pci_fixup_resume_early, to_pci_dev(dev)); - error = pci_legacy_resume_early(dev); - } -@@ -566,17 +593,18 @@ static int pci_pm_thaw_noirq(struct devi - - static int pci_pm_poweroff(struct device *dev) - { -+ struct pci_dev *pci_dev = to_pci_dev(dev); - struct device_driver *drv = dev->driver; - int error = 0; - -- pci_fixup_device(pci_fixup_suspend, to_pci_dev(dev)); -+ pci_fixup_device(pci_fixup_suspend, pci_dev); - - if (drv && drv->pm) { - if (drv->pm->poweroff) { - error = drv->pm->poweroff(dev); - suspend_report_result(drv->pm->poweroff, error); - } -- } else { -+ } else if (pci_has_legacy_pm_support(pci_dev)) { - error = pci_legacy_suspend(dev, PMSG_HIBERNATE); - } - -@@ -593,7 +621,7 @@ static int pci_pm_poweroff_noirq(struct - error = drv->pm->poweroff_noirq(dev); - suspend_report_result(drv->pm->poweroff_noirq, error); - } -- } else { -+ } else if (pci_has_legacy_pm_support(to_pci_dev(dev))) { - error = pci_legacy_suspend_late(dev, PMSG_HIBERNATE); - } - -@@ -604,13 +632,15 @@ static int pci_pm_restore(struct device - { - struct pci_dev *pci_dev = to_pci_dev(dev); - struct device_driver *drv = dev->driver; -- int error; -+ int error = 0; - - if (drv && drv->pm) { -- error = drv->pm->restore ? drv->pm->restore(dev) : -- pci_default_pm_resume(pci_dev); -- } else { -+ if (drv->pm->restore) -+ error = drv->pm->restore(dev); -+ } else if (pci_has_legacy_pm_support(pci_dev)) { - error = pci_legacy_resume(dev); -+ } else { -+ error = pci_default_pm_resume_late(pci_dev); - } - pci_fixup_device(pci_fixup_resume, pci_dev); - -@@ -628,8 +658,10 @@ static int pci_pm_restore_noirq(struct d - if (drv && drv->pm) { - if (drv->pm->restore_noirq) - error = drv->pm->restore_noirq(dev); -- } else { -+ } else if (pci_has_legacy_pm_support(pci_dev)) { - error = pci_legacy_resume_early(dev); -+ } else { -+ pci_default_pm_resume_early(pci_dev); - } - pci_fixup_device(pci_fixup_resume_early, pci_dev); - diff --git a/driver-core/pm-simplify-the-new-suspend-hibernation-framework-for-devices.patch b/driver-core/pm-simplify-the-new-suspend-hibernation-framework-for-devices.patch deleted file mode 100644 index 2a6e327a0dc863..00000000000000 --- a/driver-core/pm-simplify-the-new-suspend-hibernation-framework-for-devices.patch +++ /dev/null @@ -1,643 +0,0 @@ -From rjw@sisk.pl Fri Oct 10 14:50:02 2008 -From: "Rafael J. Wysocki" <rjw@sisk.pl> -Date: Mon, 6 Oct 2008 22:46:05 +0200 -Subject: PM: Simplify the new suspend/hibernation framework for devices -To: Greg KH <greg@kroah.com> -Cc: Alan Stern <stern@rowland.harvard.edu>, Andrew Morton <akpm@linux-foundation.org>, Jesse Barnes <jbarnes@virtuousgeek.org>, Len Brown <lenb@kernel.org>, Linus Torvalds <torvalds@linux-foundation.org>, Hannes Reinecke <hare@suse.de> -Message-ID: <200810062246.06654.rjw@sisk.pl> -Content-Disposition: inline - -From: Rafael J. Wysocki <rjw@sisk.pl> - -PM: Simplify the new suspend/hibernation framework for devices - -Following the discussion at the Kernel Summit, simplify the new -device PM framework by merging 'struct pm_ops' and -'struct pm_ext_ops' and removing pointers to 'struct pm_ext_ops' -from 'struct platform_driver' and 'struct pci_driver'. - -After this change, the suspend/hibernation callbacks will only -reside in 'struct device_driver' as well as at the bus type/ -device class/device type level. Accordingly, PCI and platform -device drivers are now expected to put their suspend/hibernation -callbacks into the 'struct device_driver' embedded in -'struct pci_driver' or 'struct platform_driver', respectively. - -Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> -Acked-by: Pavel Machek <pavel@suse.cz> -Cc: Jesse Barnes <jbarnes@virtuousgeek.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/base/platform.c | 115 ++++++++++++++++++++-------------------- - drivers/base/power/main.c | 19 +++--- - drivers/pci/pci-driver.c | 46 ++++++---------- - drivers/usb/core/usb.c | 4 - - include/linux/device.h | 8 +- - include/linux/pci.h | 1 - include/linux/platform_device.h | 1 - include/linux/pm.h | 76 ++++++++------------------ - 8 files changed, 119 insertions(+), 151 deletions(-) - ---- a/drivers/base/platform.c -+++ b/drivers/base/platform.c -@@ -503,8 +503,6 @@ int platform_driver_register(struct plat - drv->driver.suspend = platform_drv_suspend; - if (drv->resume) - drv->driver.resume = platform_drv_resume; -- if (drv->pm) -- drv->driver.pm = &drv->pm->base; - return driver_register(&drv->driver); - } - EXPORT_SYMBOL_GPL(platform_driver_register); -@@ -686,7 +684,10 @@ static int platform_pm_suspend(struct de - struct device_driver *drv = dev->driver; - int ret = 0; - -- if (drv && drv->pm) { -+ if (!drv) -+ return 0; -+ -+ if (drv->pm) { - if (drv->pm->suspend) - ret = drv->pm->suspend(dev); - } else { -@@ -698,16 +699,15 @@ static int platform_pm_suspend(struct de - - static int platform_pm_suspend_noirq(struct device *dev) - { -- struct platform_driver *pdrv; -+ struct device_driver *drv = dev->driver; - int ret = 0; - -- if (!dev->driver) -+ if (!drv) - return 0; - -- pdrv = to_platform_driver(dev->driver); -- if (pdrv->pm) { -- if (pdrv->pm->suspend_noirq) -- ret = pdrv->pm->suspend_noirq(dev); -+ if (drv->pm) { -+ if (drv->pm->suspend_noirq) -+ ret = drv->pm->suspend_noirq(dev); - } else { - ret = platform_legacy_suspend_late(dev, PMSG_SUSPEND); - } -@@ -720,7 +720,10 @@ static int platform_pm_resume(struct dev - struct device_driver *drv = dev->driver; - int ret = 0; - -- if (drv && drv->pm) { -+ if (!drv) -+ return 0; -+ -+ if (drv->pm) { - if (drv->pm->resume) - ret = drv->pm->resume(dev); - } else { -@@ -732,16 +735,15 @@ static int platform_pm_resume(struct dev - - static int platform_pm_resume_noirq(struct device *dev) - { -- struct platform_driver *pdrv; -+ struct device_driver *drv = dev->driver; - int ret = 0; - -- if (!dev->driver) -+ if (!drv) - return 0; - -- pdrv = to_platform_driver(dev->driver); -- if (pdrv->pm) { -- if (pdrv->pm->resume_noirq) -- ret = pdrv->pm->resume_noirq(dev); -+ if (drv->pm) { -+ if (drv->pm->resume_noirq) -+ ret = drv->pm->resume_noirq(dev); - } else { - ret = platform_legacy_resume_early(dev); - } -@@ -780,16 +782,15 @@ static int platform_pm_freeze(struct dev - - static int platform_pm_freeze_noirq(struct device *dev) - { -- struct platform_driver *pdrv; -+ struct device_driver *drv = dev->driver; - int ret = 0; - -- if (!dev->driver) -+ if (!drv) - return 0; - -- pdrv = to_platform_driver(dev->driver); -- if (pdrv->pm) { -- if (pdrv->pm->freeze_noirq) -- ret = pdrv->pm->freeze_noirq(dev); -+ if (drv->pm) { -+ if (drv->pm->freeze_noirq) -+ ret = drv->pm->freeze_noirq(dev); - } else { - ret = platform_legacy_suspend_late(dev, PMSG_FREEZE); - } -@@ -802,7 +803,10 @@ static int platform_pm_thaw(struct devic - struct device_driver *drv = dev->driver; - int ret = 0; - -- if (drv && drv->pm) { -+ if (!drv) -+ return 0; -+ -+ if (drv->pm) { - if (drv->pm->thaw) - ret = drv->pm->thaw(dev); - } else { -@@ -814,16 +818,15 @@ static int platform_pm_thaw(struct devic - - static int platform_pm_thaw_noirq(struct device *dev) - { -- struct platform_driver *pdrv; -+ struct device_driver *drv = dev->driver; - int ret = 0; - -- if (!dev->driver) -+ if (!drv) - return 0; - -- pdrv = to_platform_driver(dev->driver); -- if (pdrv->pm) { -- if (pdrv->pm->thaw_noirq) -- ret = pdrv->pm->thaw_noirq(dev); -+ if (drv->pm) { -+ if (drv->pm->thaw_noirq) -+ ret = drv->pm->thaw_noirq(dev); - } else { - ret = platform_legacy_resume_early(dev); - } -@@ -836,7 +839,10 @@ static int platform_pm_poweroff(struct d - struct device_driver *drv = dev->driver; - int ret = 0; - -- if (drv && drv->pm) { -+ if (!drv) -+ return 0; -+ -+ if (drv->pm) { - if (drv->pm->poweroff) - ret = drv->pm->poweroff(dev); - } else { -@@ -848,16 +854,15 @@ static int platform_pm_poweroff(struct d - - static int platform_pm_poweroff_noirq(struct device *dev) - { -- struct platform_driver *pdrv; -+ struct device_driver *drv = dev->driver; - int ret = 0; - -- if (!dev->driver) -+ if (!drv) - return 0; - -- pdrv = to_platform_driver(dev->driver); -- if (pdrv->pm) { -- if (pdrv->pm->poweroff_noirq) -- ret = pdrv->pm->poweroff_noirq(dev); -+ if (drv->pm) { -+ if (drv->pm->poweroff_noirq) -+ ret = drv->pm->poweroff_noirq(dev); - } else { - ret = platform_legacy_suspend_late(dev, PMSG_HIBERNATE); - } -@@ -870,7 +875,10 @@ static int platform_pm_restore(struct de - struct device_driver *drv = dev->driver; - int ret = 0; - -- if (drv && drv->pm) { -+ if (!drv) -+ return 0; -+ -+ if (drv->pm) { - if (drv->pm->restore) - ret = drv->pm->restore(dev); - } else { -@@ -882,16 +890,15 @@ static int platform_pm_restore(struct de - - static int platform_pm_restore_noirq(struct device *dev) - { -- struct platform_driver *pdrv; -+ struct device_driver *drv = dev->driver; - int ret = 0; - -- if (!dev->driver) -+ if (!drv) - return 0; - -- pdrv = to_platform_driver(dev->driver); -- if (pdrv->pm) { -- if (pdrv->pm->restore_noirq) -- ret = pdrv->pm->restore_noirq(dev); -+ if (drv->pm) { -+ if (drv->pm->restore_noirq) -+ ret = drv->pm->restore_noirq(dev); - } else { - ret = platform_legacy_resume_early(dev); - } -@@ -912,17 +919,15 @@ static int platform_pm_restore_noirq(str - - #endif /* !CONFIG_HIBERNATION */ - --static struct pm_ext_ops platform_pm_ops = { -- .base = { -- .prepare = platform_pm_prepare, -- .complete = platform_pm_complete, -- .suspend = platform_pm_suspend, -- .resume = platform_pm_resume, -- .freeze = platform_pm_freeze, -- .thaw = platform_pm_thaw, -- .poweroff = platform_pm_poweroff, -- .restore = platform_pm_restore, -- }, -+static struct dev_pm_ops platform_dev_pm_ops = { -+ .prepare = platform_pm_prepare, -+ .complete = platform_pm_complete, -+ .suspend = platform_pm_suspend, -+ .resume = platform_pm_resume, -+ .freeze = platform_pm_freeze, -+ .thaw = platform_pm_thaw, -+ .poweroff = platform_pm_poweroff, -+ .restore = platform_pm_restore, - .suspend_noirq = platform_pm_suspend_noirq, - .resume_noirq = platform_pm_resume_noirq, - .freeze_noirq = platform_pm_freeze_noirq, -@@ -931,7 +936,7 @@ static struct pm_ext_ops platform_pm_ops - .restore_noirq = platform_pm_restore_noirq, - }; - --#define PLATFORM_PM_OPS_PTR &platform_pm_ops -+#define PLATFORM_PM_OPS_PTR (&platform_dev_pm_ops) - - #else /* !CONFIG_PM_SLEEP */ - ---- a/drivers/base/power/main.c -+++ b/drivers/base/power/main.c -@@ -112,7 +112,8 @@ void device_pm_remove(struct device *dev - * @ops: PM operations to choose from. - * @state: PM transition of the system being carried out. - */ --static int pm_op(struct device *dev, struct pm_ops *ops, pm_message_t state) -+static int pm_op(struct device *dev, struct dev_pm_ops *ops, -+ pm_message_t state) - { - int error = 0; - -@@ -174,7 +175,7 @@ static int pm_op(struct device *dev, str - * The operation is executed with interrupts disabled by the only remaining - * functional CPU in the system. - */ --static int pm_noirq_op(struct device *dev, struct pm_ext_ops *ops, -+static int pm_noirq_op(struct device *dev, struct dev_pm_ops *ops, - pm_message_t state) - { - int error = 0; -@@ -354,7 +355,7 @@ static int resume_device(struct device * - if (dev->bus) { - if (dev->bus->pm) { - pm_dev_dbg(dev, state, ""); -- error = pm_op(dev, &dev->bus->pm->base, state); -+ error = pm_op(dev, dev->bus->pm, state); - } else if (dev->bus->resume) { - pm_dev_dbg(dev, state, "legacy "); - error = dev->bus->resume(dev); -@@ -451,9 +452,9 @@ static void complete_device(struct devic - dev->type->pm->complete(dev); - } - -- if (dev->bus && dev->bus->pm && dev->bus->pm->base.complete) { -+ if (dev->bus && dev->bus->pm && dev->bus->pm->complete) { - pm_dev_dbg(dev, state, "completing "); -- dev->bus->pm->base.complete(dev); -+ dev->bus->pm->complete(dev); - } - - up(&dev->sem); -@@ -624,7 +625,7 @@ static int suspend_device(struct device - if (dev->bus) { - if (dev->bus->pm) { - pm_dev_dbg(dev, state, ""); -- error = pm_op(dev, &dev->bus->pm->base, state); -+ error = pm_op(dev, dev->bus->pm, state); - } else if (dev->bus->suspend) { - pm_dev_dbg(dev, state, "legacy "); - error = dev->bus->suspend(dev, state); -@@ -685,10 +686,10 @@ static int prepare_device(struct device - - down(&dev->sem); - -- if (dev->bus && dev->bus->pm && dev->bus->pm->base.prepare) { -+ if (dev->bus && dev->bus->pm && dev->bus->pm->prepare) { - pm_dev_dbg(dev, state, "preparing "); -- error = dev->bus->pm->base.prepare(dev); -- suspend_report_result(dev->bus->pm->base.prepare, error); -+ error = dev->bus->pm->prepare(dev); -+ suspend_report_result(dev->bus->pm->prepare, error); - if (error) - goto End; - } ---- a/drivers/pci/pci-driver.c -+++ b/drivers/pci/pci-driver.c -@@ -433,8 +433,7 @@ static int pci_pm_suspend(struct device - - static int pci_pm_suspend_noirq(struct device *dev) - { -- struct pci_dev *pci_dev = to_pci_dev(dev); -- struct pci_driver *drv = pci_dev->driver; -+ struct device_driver *drv = dev->driver; - int error = 0; - - if (drv && drv->pm) { -@@ -469,11 +468,10 @@ static int pci_pm_resume(struct device * - - static int pci_pm_resume_noirq(struct device *dev) - { -- struct pci_dev *pci_dev = to_pci_dev(dev); -- struct pci_driver *drv = pci_dev->driver; -+ struct device_driver *drv = dev->driver; - int error = 0; - -- pci_fixup_device(pci_fixup_resume_early, pci_dev); -+ pci_fixup_device(pci_fixup_resume_early, to_pci_dev(dev)); - - if (drv && drv->pm) { - if (drv->pm->resume_noirq) -@@ -519,8 +517,7 @@ static int pci_pm_freeze(struct device * - - static int pci_pm_freeze_noirq(struct device *dev) - { -- struct pci_dev *pci_dev = to_pci_dev(dev); -- struct pci_driver *drv = pci_dev->driver; -+ struct device_driver *drv = dev->driver; - int error = 0; - - if (drv && drv->pm) { -@@ -553,15 +550,14 @@ static int pci_pm_thaw(struct device *de - - static int pci_pm_thaw_noirq(struct device *dev) - { -- struct pci_dev *pci_dev = to_pci_dev(dev); -- struct pci_driver *drv = pci_dev->driver; -+ struct device_driver *drv = dev->driver; - int error = 0; - - if (drv && drv->pm) { - if (drv->pm->thaw_noirq) - error = drv->pm->thaw_noirq(dev); - } else { -- pci_fixup_device(pci_fixup_resume_early, pci_dev); -+ pci_fixup_device(pci_fixup_resume_early, to_pci_dev(dev)); - error = pci_legacy_resume_early(dev); - } - -@@ -589,8 +585,7 @@ static int pci_pm_poweroff(struct device - - static int pci_pm_poweroff_noirq(struct device *dev) - { -- struct pci_dev *pci_dev = to_pci_dev(dev); -- struct pci_driver *drv = pci_dev->driver; -+ struct device_driver *drv = dev->driver; - int error = 0; - - if (drv && drv->pm) { -@@ -625,7 +620,7 @@ static int pci_pm_restore(struct device - static int pci_pm_restore_noirq(struct device *dev) - { - struct pci_dev *pci_dev = to_pci_dev(dev); -- struct pci_driver *drv = pci_dev->driver; -+ struct device_driver *drv = dev->driver; - int error = 0; - - pci_fixup_device(pci_fixup_resume, pci_dev); -@@ -654,17 +649,15 @@ static int pci_pm_restore_noirq(struct d - - #endif /* !CONFIG_HIBERNATION */ - --struct pm_ext_ops pci_pm_ops = { -- .base = { -- .prepare = pci_pm_prepare, -- .complete = pci_pm_complete, -- .suspend = pci_pm_suspend, -- .resume = pci_pm_resume, -- .freeze = pci_pm_freeze, -- .thaw = pci_pm_thaw, -- .poweroff = pci_pm_poweroff, -- .restore = pci_pm_restore, -- }, -+struct dev_pm_ops pci_dev_pm_ops = { -+ .prepare = pci_pm_prepare, -+ .complete = pci_pm_complete, -+ .suspend = pci_pm_suspend, -+ .resume = pci_pm_resume, -+ .freeze = pci_pm_freeze, -+ .thaw = pci_pm_thaw, -+ .poweroff = pci_pm_poweroff, -+ .restore = pci_pm_restore, - .suspend_noirq = pci_pm_suspend_noirq, - .resume_noirq = pci_pm_resume_noirq, - .freeze_noirq = pci_pm_freeze_noirq, -@@ -673,7 +666,7 @@ struct pm_ext_ops pci_pm_ops = { - .restore_noirq = pci_pm_restore_noirq, - }; - --#define PCI_PM_OPS_PTR &pci_pm_ops -+#define PCI_PM_OPS_PTR (&pci_dev_pm_ops) - - #else /* !CONFIG_PM_SLEEP */ - -@@ -703,9 +696,6 @@ int __pci_register_driver(struct pci_dri - drv->driver.owner = owner; - drv->driver.mod_name = mod_name; - -- if (drv->pm) -- drv->driver.pm = &drv->pm->base; -- - spin_lock_init(&drv->dynids.lock); - INIT_LIST_HEAD(&drv->dynids.list); - ---- a/drivers/usb/core/usb.c -+++ b/drivers/usb/core/usb.c -@@ -286,7 +286,7 @@ static int usb_dev_restore(struct device - return usb_resume(dev); - } - --static struct pm_ops usb_device_pm_ops = { -+static struct dev_pm_ops usb_device_pm_ops = { - .prepare = usb_dev_prepare, - .complete = usb_dev_complete, - .suspend = usb_dev_suspend, -@@ -301,7 +301,7 @@ static struct pm_ops usb_device_pm_ops = - - #define ksuspend_usb_init() 0 - #define ksuspend_usb_cleanup() do {} while (0) --#define usb_device_pm_ops (*(struct pm_ops *)0) -+#define usb_device_pm_ops (*(struct dev_pm_ops *)0) - - #endif /* CONFIG_PM */ - ---- a/include/linux/device.h -+++ b/include/linux/device.h -@@ -65,7 +65,7 @@ struct bus_type { - int (*resume_early)(struct device *dev); - int (*resume)(struct device *dev); - -- struct pm_ext_ops *pm; -+ struct dev_pm_ops *pm; - - struct bus_type_private *p; - }; -@@ -133,7 +133,7 @@ struct device_driver { - int (*resume) (struct device *dev); - struct attribute_group **groups; - -- struct pm_ops *pm; -+ struct dev_pm_ops *pm; - - struct driver_private *p; - }; -@@ -198,7 +198,7 @@ struct class { - int (*suspend)(struct device *dev, pm_message_t state); - int (*resume)(struct device *dev); - -- struct pm_ops *pm; -+ struct dev_pm_ops *pm; - struct class_private *p; - }; - -@@ -291,7 +291,7 @@ struct device_type { - int (*suspend)(struct device *dev, pm_message_t state); - int (*resume)(struct device *dev); - -- struct pm_ops *pm; -+ struct dev_pm_ops *pm; - }; - - /* interface for exporting device attributes */ ---- a/include/linux/pci.h -+++ b/include/linux/pci.h -@@ -421,7 +421,6 @@ struct pci_driver { - int (*resume_early) (struct pci_dev *dev); - int (*resume) (struct pci_dev *dev); /* Device woken up */ - void (*shutdown) (struct pci_dev *dev); -- struct pm_ext_ops *pm; - struct pci_error_handlers *err_handler; - struct device_driver driver; - struct pci_dynids dynids; ---- a/include/linux/platform_device.h -+++ b/include/linux/platform_device.h -@@ -55,7 +55,6 @@ struct platform_driver { - int (*suspend_late)(struct platform_device *, pm_message_t state); - int (*resume_early)(struct platform_device *); - int (*resume)(struct platform_device *); -- struct pm_ext_ops *pm; - struct device_driver driver; - }; - ---- a/include/linux/pm.h -+++ b/include/linux/pm.h -@@ -41,7 +41,7 @@ typedef struct pm_message { - } pm_message_t; - - /** -- * struct pm_ops - device PM callbacks -+ * struct dev_pm_ops - device PM callbacks - * - * Several driver power state transitions are externally visible, affecting - * the state of pending I/O queues and (for drivers that touch hardware) -@@ -126,46 +126,6 @@ typedef struct pm_message { - * On most platforms, there are no restrictions on availability of - * resources like clocks during @restore(). - * -- * All of the above callbacks, except for @complete(), return error codes. -- * However, the error codes returned by the resume operations, @resume(), -- * @thaw(), and @restore(), do not cause the PM core to abort the resume -- * transition during which they are returned. The error codes returned in -- * that cases are only printed by the PM core to the system logs for debugging -- * purposes. Still, it is recommended that drivers only return error codes -- * from their resume methods in case of an unrecoverable failure (i.e. when the -- * device being handled refuses to resume and becomes unusable) to allow us to -- * modify the PM core in the future, so that it can avoid attempting to handle -- * devices that failed to resume and their children. -- * -- * It is allowed to unregister devices while the above callbacks are being -- * executed. However, it is not allowed to unregister a device from within any -- * of its own callbacks. -- */ -- --struct pm_ops { -- int (*prepare)(struct device *dev); -- void (*complete)(struct device *dev); -- int (*suspend)(struct device *dev); -- int (*resume)(struct device *dev); -- int (*freeze)(struct device *dev); -- int (*thaw)(struct device *dev); -- int (*poweroff)(struct device *dev); -- int (*restore)(struct device *dev); --}; -- --/** -- * struct pm_ext_ops - extended device PM callbacks -- * -- * Some devices require certain operations related to suspend and hibernation -- * to be carried out with interrupts disabled. Thus, 'struct pm_ext_ops' below -- * is defined, adding callbacks to be executed with interrupts disabled to -- * 'struct pm_ops'. -- * -- * The following callbacks included in 'struct pm_ext_ops' are executed with -- * the nonboot CPUs switched off and with interrupts disabled on the only -- * functional CPU. They also are executed with the PM core list of devices -- * locked, so they must NOT unregister any devices. -- * - * @suspend_noirq: Complete the operations of ->suspend() by carrying out any - * actions required for suspending the device that need interrupts to be - * disabled -@@ -190,18 +150,32 @@ struct pm_ops { - * actions required for restoring the operations of the device that need - * interrupts to be disabled - * -- * All of the above callbacks return error codes, but the error codes returned -- * by the resume operations, @resume_noirq(), @thaw_noirq(), and -- * @restore_noirq(), do not cause the PM core to abort the resume transition -- * during which they are returned. The error codes returned in that cases are -- * only printed by the PM core to the system logs for debugging purposes. -- * Still, as stated above, it is recommended that drivers only return error -- * codes from their resume methods if the device being handled fails to resume -- * and is not usable any more. -+ * All of the above callbacks, except for @complete(), return error codes. -+ * However, the error codes returned by the resume operations, @resume(), -+ * @thaw(), @restore(), @resume_noirq(), @thaw_noirq(), and @restore_noirq() do -+ * not cause the PM core to abort the resume transition during which they are -+ * returned. The error codes returned in that cases are only printed by the PM -+ * core to the system logs for debugging purposes. Still, it is recommended -+ * that drivers only return error codes from their resume methods in case of an -+ * unrecoverable failure (i.e. when the device being handled refuses to resume -+ * and becomes unusable) to allow us to modify the PM core in the future, so -+ * that it can avoid attempting to handle devices that failed to resume and -+ * their children. -+ * -+ * It is allowed to unregister devices while the above callbacks are being -+ * executed. However, it is not allowed to unregister a device from within any -+ * of its own callbacks. - */ - --struct pm_ext_ops { -- struct pm_ops base; -+struct dev_pm_ops { -+ int (*prepare)(struct device *dev); -+ void (*complete)(struct device *dev); -+ int (*suspend)(struct device *dev); -+ int (*resume)(struct device *dev); -+ int (*freeze)(struct device *dev); -+ int (*thaw)(struct device *dev); -+ int (*poweroff)(struct device *dev); -+ int (*restore)(struct device *dev); - int (*suspend_noirq)(struct device *dev); - int (*resume_noirq)(struct device *dev); - int (*freeze_noirq)(struct device *dev); diff --git a/driver-core/s390-remove-s390_root_dev_.patch b/driver-core/s390-remove-s390_root_dev_.patch deleted file mode 100644 index d9bdd0048d8593..00000000000000 --- a/driver-core/s390-remove-s390_root_dev_.patch +++ /dev/null @@ -1,355 +0,0 @@ -From markmc@redhat.com Thu Dec 18 16:18:17 2008 -From: Mark McLoughlin <markmc@redhat.com> -Date: Mon, 15 Dec 2008 12:58:29 +0000 -Subject: s390: remove s390_root_dev_*() -To: Greg KH <gregkh@suse.de> -Cc: Rusty Russell <rusty@rustcorp.com.au>, Anthony Liguori <aliguori@us.ibm.com>, Kay Sievers <kay.sievers@vrfy.org>, Cornelia Huck <cornelia.huck@de.ibm.com>, Mark McLoughlin <markmc@redhat.com> -Message-ID: <1229345909-27229-4-git-send-email-markmc@redhat.com> - - -Replace s390_root_dev_register() with root_device_register() etc. - -[Includes fix from Cornelia Huck] - -Signed-off-by: Mark McLoughlin <markmc@redhat.com> -Cc: Cornelia Huck <cornelia.huck@de.ibm.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - arch/s390/include/asm/s390_rdev.h | 15 ----------- - drivers/s390/Makefile | 2 - - drivers/s390/block/dcssblk.c | 11 +++----- - drivers/s390/crypto/ap_bus.c | 7 ++--- - drivers/s390/kvm/kvm_virtio.c | 5 +-- - drivers/s390/net/cu3088.c | 7 ++--- - drivers/s390/net/qeth_core_main.c | 7 ++--- - drivers/s390/net/qeth_l2_main.c | 2 - - drivers/s390/net/qeth_l3_main.c | 2 - - drivers/s390/s390_rdev.c | 51 -------------------------------------- - net/iucv/iucv.c | 7 ++--- - 11 files changed, 20 insertions(+), 96 deletions(-) - ---- a/arch/s390/include/asm/s390_rdev.h -+++ /dev/null -@@ -1,15 +0,0 @@ --/* -- * include/asm-s390/ccwdev.h -- * -- * Copyright (C) 2002,2005 IBM Deutschland Entwicklung GmbH, IBM Corporation -- * Author(s): Cornelia Huck <cornelia.huck@de.ibm.com> -- * Carsten Otte <cotte@de.ibm.com> -- * -- * Interface for s390 root device -- */ -- --#ifndef _S390_RDEV_H_ --#define _S390_RDEV_H_ --extern struct device *s390_root_dev_register(const char *); --extern void s390_root_dev_unregister(struct device *); --#endif /* _S390_RDEV_H_ */ ---- a/drivers/s390/block/dcssblk.c -+++ b/drivers/s390/block/dcssblk.c -@@ -18,7 +18,6 @@ - #include <asm/io.h> - #include <linux/completion.h> - #include <linux/interrupt.h> --#include <asm/s390_rdev.h> - - #define DCSSBLK_NAME "dcssblk" - #define DCSSBLK_MINORS_PER_DISK 1 -@@ -946,7 +945,7 @@ dcssblk_check_params(void) - static void __exit - dcssblk_exit(void) - { -- s390_root_dev_unregister(dcssblk_root_dev); -+ root_device_unregister(dcssblk_root_dev); - unregister_blkdev(dcssblk_major, DCSSBLK_NAME); - } - -@@ -955,22 +954,22 @@ dcssblk_init(void) - { - int rc; - -- dcssblk_root_dev = s390_root_dev_register("dcssblk"); -+ dcssblk_root_dev = root_device_register("dcssblk"); - if (IS_ERR(dcssblk_root_dev)) - return PTR_ERR(dcssblk_root_dev); - rc = device_create_file(dcssblk_root_dev, &dev_attr_add); - if (rc) { -- s390_root_dev_unregister(dcssblk_root_dev); -+ root_device_unregister(dcssblk_root_dev); - return rc; - } - rc = device_create_file(dcssblk_root_dev, &dev_attr_remove); - if (rc) { -- s390_root_dev_unregister(dcssblk_root_dev); -+ root_device_unregister(dcssblk_root_dev); - return rc; - } - rc = register_blkdev(0, DCSSBLK_NAME); - if (rc < 0) { -- s390_root_dev_unregister(dcssblk_root_dev); -+ root_device_unregister(dcssblk_root_dev); - return rc; - } - dcssblk_major = rc; ---- a/drivers/s390/crypto/ap_bus.c -+++ b/drivers/s390/crypto/ap_bus.c -@@ -36,7 +36,6 @@ - #include <linux/notifier.h> - #include <linux/kthread.h> - #include <linux/mutex.h> --#include <asm/s390_rdev.h> - #include <asm/reset.h> - #include <asm/airq.h> - #include <asm/atomic.h> -@@ -1522,7 +1521,7 @@ int __init ap_module_init(void) - } - - /* Create /sys/devices/ap. */ -- ap_root_device = s390_root_dev_register("ap"); -+ ap_root_device = root_device_register("ap"); - rc = IS_ERR(ap_root_device) ? PTR_ERR(ap_root_device) : 0; - if (rc) - goto out_bus; -@@ -1565,7 +1564,7 @@ out_work: - hrtimer_cancel(&ap_poll_timer); - destroy_workqueue(ap_work_queue); - out_root: -- s390_root_dev_unregister(ap_root_device); -+ root_device_unregister(ap_root_device); - out_bus: - while (i--) - bus_remove_file(&ap_bus_type, ap_bus_attrs[i]); -@@ -1600,7 +1599,7 @@ void ap_module_exit(void) - hrtimer_cancel(&ap_poll_timer); - destroy_workqueue(ap_work_queue); - tasklet_kill(&ap_tasklet); -- s390_root_dev_unregister(ap_root_device); -+ root_device_unregister(ap_root_device); - while ((dev = bus_find_device(&ap_bus_type, NULL, NULL, - __ap_match_all))) - { ---- a/drivers/s390/kvm/kvm_virtio.c -+++ b/drivers/s390/kvm/kvm_virtio.c -@@ -24,7 +24,6 @@ - #include <asm/kvm_virtio.h> - #include <asm/setup.h> - #include <asm/s390_ext.h> --#include <asm/s390_rdev.h> - - #define VIRTIO_SUBCODE_64 0x0D00 - -@@ -335,7 +334,7 @@ static int __init kvm_devices_init(void) - if (!MACHINE_IS_KVM) - return -ENODEV; - -- kvm_root = s390_root_dev_register("kvm_s390"); -+ kvm_root = root_device_register("kvm_s390"); - if (IS_ERR(kvm_root)) { - rc = PTR_ERR(kvm_root); - printk(KERN_ERR "Could not register kvm_s390 root device"); -@@ -344,7 +343,7 @@ static int __init kvm_devices_init(void) - - rc = vmem_add_mapping(real_memory_size, PAGE_SIZE); - if (rc) { -- s390_root_dev_unregister(kvm_root); -+ root_device_unregister(kvm_root); - return rc; - } - ---- a/drivers/s390/Makefile -+++ b/drivers/s390/Makefile -@@ -4,7 +4,7 @@ - - CFLAGS_sysinfo.o += -Iinclude/math-emu -Iarch/s390/math-emu -w - --obj-y += s390mach.o sysinfo.o s390_rdev.o -+obj-y += s390mach.o sysinfo.o - obj-y += cio/ block/ char/ crypto/ net/ scsi/ kvm/ - - drivers-y += drivers/s390/built-in.o ---- a/drivers/s390/net/cu3088.c -+++ b/drivers/s390/net/cu3088.c -@@ -25,7 +25,6 @@ - #include <linux/module.h> - #include <linux/err.h> - --#include <asm/s390_rdev.h> - #include <asm/ccwdev.h> - #include <asm/ccwgroup.h> - -@@ -120,12 +119,12 @@ cu3088_init (void) - { - int rc; - -- cu3088_root_dev = s390_root_dev_register("cu3088"); -+ cu3088_root_dev = root_device_register("cu3088"); - if (IS_ERR(cu3088_root_dev)) - return PTR_ERR(cu3088_root_dev); - rc = ccw_driver_register(&cu3088_driver); - if (rc) -- s390_root_dev_unregister(cu3088_root_dev); -+ root_device_unregister(cu3088_root_dev); - - return rc; - } -@@ -134,7 +133,7 @@ static void __exit - cu3088_exit (void) - { - ccw_driver_unregister(&cu3088_driver); -- s390_root_dev_unregister(cu3088_root_dev); -+ root_device_unregister(cu3088_root_dev); - } - - MODULE_DEVICE_TABLE(ccw,cu3088_ids); ---- a/drivers/s390/net/qeth_core_main.c -+++ b/drivers/s390/net/qeth_core_main.c -@@ -24,7 +24,6 @@ - - #include <asm/ebcdic.h> - #include <asm/io.h> --#include <asm/s390_rdev.h> - - #include "qeth_core.h" - #include "qeth_core_offl.h" -@@ -4525,7 +4524,7 @@ static int __init qeth_core_init(void) - &driver_attr_group); - if (rc) - goto driver_err; -- qeth_core_root_dev = s390_root_dev_register("qeth"); -+ qeth_core_root_dev = root_device_register("qeth"); - rc = IS_ERR(qeth_core_root_dev) ? PTR_ERR(qeth_core_root_dev) : 0; - if (rc) - goto register_err; -@@ -4539,7 +4538,7 @@ static int __init qeth_core_init(void) - - return 0; - slab_err: -- s390_root_dev_unregister(qeth_core_root_dev); -+ root_device_unregister(qeth_core_root_dev); - register_err: - driver_remove_file(&qeth_core_ccwgroup_driver.driver, - &driver_attr_group); -@@ -4557,7 +4556,7 @@ out_err: - - static void __exit qeth_core_exit(void) - { -- s390_root_dev_unregister(qeth_core_root_dev); -+ root_device_unregister(qeth_core_root_dev); - driver_remove_file(&qeth_core_ccwgroup_driver.driver, - &driver_attr_group); - ccwgroup_driver_unregister(&qeth_core_ccwgroup_driver); ---- a/drivers/s390/net/qeth_l2_main.c -+++ b/drivers/s390/net/qeth_l2_main.c -@@ -20,8 +20,6 @@ - #include <linux/mii.h> - #include <linux/ip.h> - --#include <asm/s390_rdev.h> -- - #include "qeth_core.h" - #include "qeth_core_offl.h" - ---- a/drivers/s390/net/qeth_l3_main.c -+++ b/drivers/s390/net/qeth_l3_main.c -@@ -26,8 +26,6 @@ - #include <net/ip.h> - #include <net/arp.h> - --#include <asm/s390_rdev.h> -- - #include "qeth_l3.h" - #include "qeth_core_offl.h" - ---- a/drivers/s390/s390_rdev.c -+++ /dev/null -@@ -1,51 +0,0 @@ --/* -- * drivers/s390/s390_rdev.c -- * s390 root device -- * -- * Copyright (C) 2002, 2005 IBM Deutschland Entwicklung GmbH, -- * IBM Corporation -- * Author(s): Cornelia Huck (cornelia.huck@de.ibm.com) -- * Carsten Otte (cotte@de.ibm.com) -- */ -- --#include <linux/slab.h> --#include <linux/err.h> --#include <linux/device.h> --#include <asm/s390_rdev.h> -- --static void --s390_root_dev_release(struct device *dev) --{ -- kfree(dev); --} -- --struct device * --s390_root_dev_register(const char *name) --{ -- struct device *dev; -- int ret; -- -- if (!strlen(name)) -- return ERR_PTR(-EINVAL); -- dev = kzalloc(sizeof(struct device), GFP_KERNEL); -- if (!dev) -- return ERR_PTR(-ENOMEM); -- dev_set_name(dev, name); -- dev->release = s390_root_dev_release; -- ret = device_register(dev); -- if (ret) { -- kfree(dev); -- return ERR_PTR(ret); -- } -- return dev; --} -- --void --s390_root_dev_unregister(struct device *dev) --{ -- if (dev) -- device_unregister(dev); --} -- --EXPORT_SYMBOL(s390_root_dev_register); --EXPORT_SYMBOL(s390_root_dev_unregister); ---- a/net/iucv/iucv.c -+++ b/net/iucv/iucv.c -@@ -50,7 +50,6 @@ - #include <asm/ebcdic.h> - #include <asm/io.h> - #include <asm/s390_ext.h> --#include <asm/s390_rdev.h> - #include <asm/smp.h> - - /* -@@ -1696,7 +1695,7 @@ static int __init iucv_init(void) - rc = register_external_interrupt(0x4000, iucv_external_interrupt); - if (rc) - goto out; -- iucv_root = s390_root_dev_register("iucv"); -+ iucv_root = root_device_register("iucv"); - if (IS_ERR(iucv_root)) { - rc = PTR_ERR(iucv_root); - goto out_int; -@@ -1740,7 +1739,7 @@ out_free: - kfree(iucv_irq_data[cpu]); - iucv_irq_data[cpu] = NULL; - } -- s390_root_dev_unregister(iucv_root); -+ root_device_unregister(iucv_root); - out_int: - unregister_external_interrupt(0x4000, iucv_external_interrupt); - out: -@@ -1770,7 +1769,7 @@ static void __exit iucv_exit(void) - kfree(iucv_irq_data[cpu]); - iucv_irq_data[cpu] = NULL; - } -- s390_root_dev_unregister(iucv_root); -+ root_device_unregister(iucv_root); - bus_unregister(&iucv_bus); - unregister_external_interrupt(0x4000, iucv_external_interrupt); - } diff --git a/driver-core/sysfs-clarify-sysfs_deprecated-help-text.patch b/driver-core/sysfs-clarify-sysfs_deprecated-help-text.patch deleted file mode 100644 index de521ed97483bf..00000000000000 --- a/driver-core/sysfs-clarify-sysfs_deprecated-help-text.patch +++ /dev/null @@ -1,76 +0,0 @@ -From kay.sievers@vrfy.org Wed Nov 12 11:33:20 2008 -From: Kay Sievers <kay.sievers@vrfy.org> -Date: Sat, 01 Nov 2008 14:03:00 +0100 -Subject: sysfs: clarify SYSFS_DEPRECATED help text -To: Greg KH <greg@kroah.com> -Message-ID: <1225544580.13224.12.camel@nga.site> - -From: Kay Sievers <kay.sievers@vrfy.org> - -This should make the help text of SYSFS_DEPRECATED more clear, that this -is _not_ about (what some people think it is) suppressing a few symlinks -and variables, but a different sysfs _layout_ with new features. - -Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - init/Kconfig | 42 ++++++++++++++++++++++++++---------------- - 1 file changed, 26 insertions(+), 16 deletions(-) - ---- a/init/Kconfig -+++ b/init/Kconfig -@@ -423,27 +423,37 @@ config SYSFS_DEPRECATED - bool - - config SYSFS_DEPRECATED_V2 -- bool "Create deprecated sysfs files" -+ bool "Create deprecated sysfs layout for older userspace tools" - depends on SYSFS - default y - select SYSFS_DEPRECATED - help -- This option creates deprecated symlinks such as the -- "device"-link, the <subsystem>:<name>-link, and the -- "bus"-link. It may also add deprecated key in the -- uevent environment. -- None of these features or values should be used today, as -- they export driver core implementation details to userspace -- or export properties which can't be kept stable across kernel -- releases. -- -- If enabled, this option will also move any device structures -- that belong to a class, back into the /sys/class hierarchy, in -- order to support older versions of udev and some userspace -- programs. -+ This option switches the layout of sysfs to the deprecated -+ version. - -- If you are using a distro with the most recent userspace -- packages, it should be safe to say N here. -+ The current sysfs layout features a unified device tree at -+ /sys/devices/, which is able to express a hierarchy between -+ class devices. If the deprecated option is set to Y, the -+ unified device tree is split into a bus device tree at -+ /sys/devices/ and several individual class device trees at -+ /sys/class/. The class and bus devices will be connected by -+ "<subsystem>:<name>" and the "device" links. The "block" -+ class devices, will not show up in /sys/class/block/. Some -+ subsystems will suppress the creation of some devices which -+ depend on the unified device tree. -+ -+ This option is not a pure compatibility option that can -+ be safely enabled on newer distributions. It will change the -+ layout of sysfs to the non-extensible deprecated version, -+ and disable some features, which can not be exported without -+ confusing older userspace tools. Since 2007/2008 all major -+ distributions do not enable this option, and ship no tools which -+ depend on the deprecated layout or this option. -+ -+ If you are using a new kernel on an older distribution, or use -+ older userspace tools, you might need to say Y here. Do not say Y, -+ if the original kernel, that came with your distribution, has -+ this option set to N. - - config PROC_PID_CPUSET - bool "Include legacy /proc/<pid>/cpuset file" diff --git a/driver-core/uevent-don-t-pass-envp_ext-as-format-string-in-kobject_uevent_env.patch b/driver-core/uevent-don-t-pass-envp_ext-as-format-string-in-kobject_uevent_env.patch deleted file mode 100644 index 522598df0a16d0..00000000000000 --- a/driver-core/uevent-don-t-pass-envp_ext-as-format-string-in-kobject_uevent_env.patch +++ /dev/null @@ -1,33 +0,0 @@ -From tj@kernel.org Mon Nov 17 15:00:43 2008 -From: Tejun Heo <tj@kernel.org> -Date: Thu, 13 Nov 2008 13:20:00 +0900 -Subject: uevent: don't pass envp_ext[] as format string in kobject_uevent_env() -To: Greg KH <greg@kroah.com>, Kay Sievers <kay.sievers@vrfy.org> -Message-ID: <491BAAF0.5010203@kernel.org> - -From: Tejun Heo <tj@kernel.org> - -kobject_uevent_env() uses envp_ext[] as verbatim format string which -can cause problems ranging from unexpectedly mangled string to oops if -a string in envp_ext[] contains substring which can be interpreted as -format. Fix it. - -Signed-off-by: Tejun Heo <tj@kernel.org> -Cc: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - lib/kobject_uevent.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/lib/kobject_uevent.c -+++ b/lib/kobject_uevent.c -@@ -165,7 +165,7 @@ int kobject_uevent_env(struct kobject *k - /* keys passed in from the caller */ - if (envp_ext) { - for (i = 0; envp_ext[i]; i++) { -- retval = add_uevent_var(env, envp_ext[i]); -+ retval = add_uevent_var(env, "%s", envp_ext[i]); - if (retval) - goto exit; - } diff --git a/driver-core/uio-documentation-for-uio-ioport-info-handling.patch b/driver-core/uio-documentation-for-uio-ioport-info-handling.patch deleted file mode 100644 index b50e7564c3710e..00000000000000 --- a/driver-core/uio-documentation-for-uio-ioport-info-handling.patch +++ /dev/null @@ -1,146 +0,0 @@ -From hjk@linutronix.de Tue Dec 9 20:34:03 2008 -From: "Hans J. Koch" <hjk@linutronix.de> -Date: Sat, 6 Dec 2008 02:25:13 +0100 -Subject: UIO: Documentation for UIO ioport info handling -Cc: gregkh@suse.de, Mike Frysinger <vapier@gentoo.org>, John Ogness <jogness@linutronix.de>, Benedikt Spranger <b.spranger@linutronix.de> -Message-ID: <20081206012513.GC3081@local> -Content-Disposition: inline - - -This patch updates UIO documentation with the changes introduced by -previous UIO patch. - -Signed-off-by: Hans J. Koch <hjk@linutronix.de> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - Documentation/DocBook/uio-howto.tmpl | 97 +++++++++++++++++++++++++++++++++++ - 1 file changed, 97 insertions(+) - ---- a/Documentation/DocBook/uio-howto.tmpl -+++ b/Documentation/DocBook/uio-howto.tmpl -@@ -42,6 +42,12 @@ GPL version 2. - - <revhistory> - <revision> -+ <revnumber>0.6</revnumber> -+ <date>2008-12-05</date> -+ <authorinitials>hjk</authorinitials> -+ <revremark>Added description of portio sysfs attributes.</revremark> -+ </revision> -+ <revision> - <revnumber>0.5</revnumber> - <date>2008-05-22</date> - <authorinitials>hjk</authorinitials> -@@ -318,6 +324,54 @@ interested in translating it, please ema - offset = N * getpagesize(); - </programlisting> - -+<para> -+ Sometimes there is hardware with memory-like regions that can not be -+ mapped with the technique described here, but there are still ways to -+ access them from userspace. The most common example are x86 ioports. -+ On x86 systems, userspace can access these ioports using -+ <function>ioperm()</function>, <function>iopl()</function>, -+ <function>inb()</function>, <function>outb()</function>, and similar -+ functions. -+</para> -+<para> -+ Since these ioport regions can not be mapped, they will not appear under -+ <filename>/sys/class/uio/uioX/maps/</filename> like the normal memory -+ described above. Without information about the port regions a hardware -+ has to offer, it becomes difficult for the userspace part of the -+ driver to find out which ports belong to which UIO device. -+</para> -+<para> -+ To address this situation, the new directory -+ <filename>/sys/class/uio/uioX/portio/</filename> was added. It only -+ exists if the driver wants to pass information about one or more port -+ regions to userspace. If that is the case, subdirectories named -+ <filename>port0</filename>, <filename>port1</filename>, and so on, -+ will appear underneath -+ <filename>/sys/class/uio/uioX/portio/</filename>. -+</para> -+<para> -+ Each <filename>portX/</filename> directory contains three read-only -+ files that show start, size, and type of the port region: -+</para> -+<itemizedlist> -+<listitem> -+ <para> -+ <filename>start</filename>: The first port of this region. -+ </para> -+</listitem> -+<listitem> -+ <para> -+ <filename>size</filename>: The number of ports in this region. -+ </para> -+</listitem> -+<listitem> -+ <para> -+ <filename>porttype</filename>: A string describing the type of port. -+ </para> -+</listitem> -+</itemizedlist> -+ -+ - </sect1> - </chapter> - -@@ -356,6 +410,13 @@ See the description below for details. - </para></listitem> - - <listitem><para> -+<varname>struct uio_port port[ MAX_UIO_PORTS_REGIONS ]</varname>: Required -+if you want to pass information about ioports to userspace. For each port -+region you need to fill one of the <varname>uio_port</varname> structures. -+See the description below for details. -+</para></listitem> -+ -+<listitem><para> - <varname>long irq</varname>: Required. If your hardware generates an - interrupt, it's your modules task to determine the irq number during - initialization. If you don't have a hardware generated interrupt but -@@ -448,6 +509,42 @@ Please do not touch the <varname>kobj</v - <varname>struct uio_mem</varname>! It is used by the UIO framework - to set up sysfs files for this mapping. Simply leave it alone. - </para> -+ -+<para> -+Sometimes, your device can have one or more port regions which can not be -+mapped to userspace. But if there are other possibilities for userspace to -+access these ports, it makes sense to make information about the ports -+available in sysfs. For each region, you have to set up a -+<varname>struct uio_port</varname> in the <varname>port[]</varname> array. -+Here's a description of the fields of <varname>struct uio_port</varname>: -+</para> -+ -+<itemizedlist> -+<listitem><para> -+<varname>char *porttype</varname>: Required. Set this to one of the predefined -+constants. Use <varname>UIO_PORT_X86</varname> for the ioports found in x86 -+architectures. -+</para></listitem> -+ -+<listitem><para> -+<varname>unsigned long start</varname>: Required if the port region is used. -+Fill in the number of the first port of this region. -+</para></listitem> -+ -+<listitem><para> -+<varname>unsigned long size</varname>: Fill in the number of ports in this -+region. If <varname>size</varname> is zero, the region is considered unused. -+Note that you <emphasis>must</emphasis> initialize <varname>size</varname> -+with zero for all unused regions. -+</para></listitem> -+</itemizedlist> -+ -+<para> -+Please do not touch the <varname>portio</varname> element of -+<varname>struct uio_port</varname>! It is used internally by the UIO -+framework to set up sysfs files for this region. Simply leave it alone. -+</para> -+ - </sect1> - - <sect1 id="adding_irq_handler"> diff --git a/driver-core/uio-make-uio_info-s-name-and-version-const.patch b/driver-core/uio-make-uio_info-s-name-and-version-const.patch deleted file mode 100644 index 719dc5ced59d4e..00000000000000 --- a/driver-core/uio-make-uio_info-s-name-and-version-const.patch +++ /dev/null @@ -1,56 +0,0 @@ -From hjk@linutronix.de Thu Dec 18 15:52:51 2008 -From: Stephen Rothwell <sfr@canb.auug.org.au> -Date: Fri, 12 Dec 2008 11:44:21 +0100 -Subject: uio: make uio_info's name and version const -To: Stephen Rothwell <sfr@canb.auug.org.au> -Cc: "Hans J. Koch" <hjk@linutronix.de>, Greg Kroah-Hartman <gregkh@suse.de>, LKML <linux-kernel@vger.kernel.org>, Wolfram Sang <w.sang@pengutronix.de> -Message-ID: <20081212104420.GA3084@local> -Content-Disposition: inline - -From: Stephen Rothwell <sfr@canb.auug.org.au> - -These are only ever assigned constant strings and never modified. - -This was noticed because Wolfram Sang needed to cast the result of -of_get_property() in order to assign it to the name field of a struct -uio_info. - -Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> -Signed-off-by: Hans J. Koch <hjk@linutronix.de> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - Documentation/DocBook/uio-howto.tmpl | 4 ++-- - include/linux/uio_driver.h | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) - ---- a/Documentation/DocBook/uio-howto.tmpl -+++ b/Documentation/DocBook/uio-howto.tmpl -@@ -393,12 +393,12 @@ offset = N * getpagesize(); - - <itemizedlist> - <listitem><para> --<varname>char *name</varname>: Required. The name of your driver as -+<varname>const char *name</varname>: Required. The name of your driver as - it will appear in sysfs. I recommend using the name of your module for this. - </para></listitem> - - <listitem><para> --<varname>char *version</varname>: Required. This string appears in -+<varname>const char *version</varname>: Required. This string appears in - <filename>/sys/class/uio/uioX/version</filename>. - </para></listitem> - ---- a/include/linux/uio_driver.h -+++ b/include/linux/uio_driver.h -@@ -76,8 +76,8 @@ struct uio_device; - */ - struct uio_info { - struct uio_device *uio_dev; -- char *name; -- char *version; -+ const char *name; -+ const char *version; - struct uio_mem mem[MAX_UIO_MAPS]; - struct uio_port port[MAX_UIO_PORT_REGIONS]; - long irq; diff --git a/driver-core/uio-pass-information-about-ioports-to-userspace.patch b/driver-core/uio-pass-information-about-ioports-to-userspace.patch deleted file mode 100644 index 526c9a2d027af9..00000000000000 --- a/driver-core/uio-pass-information-about-ioports-to-userspace.patch +++ /dev/null @@ -1,350 +0,0 @@ -From hjk@linutronix.de Tue Dec 9 20:33:38 2008 -From: "Hans J. Koch" <hjk@linutronix.de> -Date: Sat, 6 Dec 2008 02:23:13 +0100 -Subject: UIO: Pass information about ioports to userspace (V2) -To: linux-kernel@vger.kernel.org -Cc: gregkh@suse.de, Mike Frysinger <vapier@gentoo.org>, John Ogness <jogness@linutronix.de>, Benedikt Spranger <b.spranger@linutronix.de>, "Hans J. Koch" <hjk@linutronix.de> -Message-ID: <20081206012313.GB3081@local> -Content-Disposition: inline - -From: "Hans J. Koch" <hjk@linutronix.de> - -Devices sometimes have memory where all or parts of it can not be mapped to -userspace. But it might still be possible to access this memory from -userspace by other means. An example are PCI cards that advertise not only -mappable memory but also ioport ranges. On x86 architectures, these can be -accessed with ioperm, iopl, inb, outb, and friends. Mike Frysinger (CCed) -reported a similar problem on Blackfin arch where it doesn't seem to be easy -to mmap non-cached memory but it can still be accessed from userspace. - -This patch allows kernel drivers to pass information about such ports to -userspace. Similar to the existing mem[] array, it adds a port[] array to -struct uio_info. Each port range is described by start, size, and porttype. - -If a driver fills in at least one such port range, the UIO core will simply -pass this information to userspace by creating a new directory "portio" -underneath /sys/class/uio/uioN/. Similar to the "mem" directory, it will -contain a subdirectory (portX) for each port range given. - -Note that UIO simply passes this information to userspace, it performs no -action whatsoever with this data. It's userspace's responsibility to obtain -access to these ports and to solve arch dependent issues. The "porttype" -attribute tells userspace what kind of port it is dealing with. - -This mechanism could also be used to give userspace information about GPIOs -related to a device. You frequently find such hardware in embedded devices, -so I added a UIO_PORT_GPIO definition. I'm not really sure if this is a good -idea since there are other solutions to this problem, but it won't hurt much -anyway. - -Signed-off-by: Hans J. Koch <hjk@linutronix.de> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/uio/uio.c | 159 ++++++++++++++++++++++++++++++++++++++++----- - include/linux/uio_driver.h | 26 +++++++ - 2 files changed, 168 insertions(+), 17 deletions(-) - ---- a/drivers/uio/uio.c -+++ b/drivers/uio/uio.c -@@ -35,6 +35,7 @@ struct uio_device { - int vma_count; - struct uio_info *info; - struct kobject *map_dir; -+ struct kobject *portio_dir; - }; - - static int uio_major; -@@ -75,17 +76,17 @@ static ssize_t map_offset_show(struct ui - return sprintf(buf, "0x%lx\n", mem->addr & ~PAGE_MASK); - } - --struct uio_sysfs_entry { -+struct map_sysfs_entry { - struct attribute attr; - ssize_t (*show)(struct uio_mem *, char *); - ssize_t (*store)(struct uio_mem *, const char *, size_t); - }; - --static struct uio_sysfs_entry addr_attribute = -+static struct map_sysfs_entry addr_attribute = - __ATTR(addr, S_IRUGO, map_addr_show, NULL); --static struct uio_sysfs_entry size_attribute = -+static struct map_sysfs_entry size_attribute = - __ATTR(size, S_IRUGO, map_size_show, NULL); --static struct uio_sysfs_entry offset_attribute = -+static struct map_sysfs_entry offset_attribute = - __ATTR(offset, S_IRUGO, map_offset_show, NULL); - - static struct attribute *attrs[] = { -@@ -106,9 +107,9 @@ static ssize_t map_type_show(struct kobj - { - struct uio_map *map = to_map(kobj); - struct uio_mem *mem = map->mem; -- struct uio_sysfs_entry *entry; -+ struct map_sysfs_entry *entry; - -- entry = container_of(attr, struct uio_sysfs_entry, attr); -+ entry = container_of(attr, struct map_sysfs_entry, attr); - - if (!entry->show) - return -EIO; -@@ -116,16 +117,93 @@ static ssize_t map_type_show(struct kobj - return entry->show(mem, buf); - } - --static struct sysfs_ops uio_sysfs_ops = { -+static struct sysfs_ops map_sysfs_ops = { - .show = map_type_show, - }; - - static struct kobj_type map_attr_type = { - .release = map_release, -- .sysfs_ops = &uio_sysfs_ops, -+ .sysfs_ops = &map_sysfs_ops, - .default_attrs = attrs, - }; - -+struct uio_portio { -+ struct kobject kobj; -+ struct uio_port *port; -+}; -+#define to_portio(portio) container_of(portio, struct uio_portio, kobj) -+ -+static ssize_t portio_start_show(struct uio_port *port, char *buf) -+{ -+ return sprintf(buf, "0x%lx\n", port->start); -+} -+ -+static ssize_t portio_size_show(struct uio_port *port, char *buf) -+{ -+ return sprintf(buf, "0x%lx\n", port->size); -+} -+ -+static ssize_t portio_porttype_show(struct uio_port *port, char *buf) -+{ -+ const char *porttypes[] = {"none", "x86", "gpio", "other"}; -+ -+ if ((port->porttype < 0) || (port->porttype > UIO_PORT_OTHER)) -+ return -EINVAL; -+ -+ return sprintf(buf, "port_%s\n", porttypes[port->porttype]); -+} -+ -+struct portio_sysfs_entry { -+ struct attribute attr; -+ ssize_t (*show)(struct uio_port *, char *); -+ ssize_t (*store)(struct uio_port *, const char *, size_t); -+}; -+ -+static struct portio_sysfs_entry portio_start_attribute = -+ __ATTR(start, S_IRUGO, portio_start_show, NULL); -+static struct portio_sysfs_entry portio_size_attribute = -+ __ATTR(size, S_IRUGO, portio_size_show, NULL); -+static struct portio_sysfs_entry portio_porttype_attribute = -+ __ATTR(porttype, S_IRUGO, portio_porttype_show, NULL); -+ -+static struct attribute *portio_attrs[] = { -+ &portio_start_attribute.attr, -+ &portio_size_attribute.attr, -+ &portio_porttype_attribute.attr, -+ NULL, -+}; -+ -+static void portio_release(struct kobject *kobj) -+{ -+ struct uio_portio *portio = to_portio(kobj); -+ kfree(portio); -+} -+ -+static ssize_t portio_type_show(struct kobject *kobj, struct attribute *attr, -+ char *buf) -+{ -+ struct uio_portio *portio = to_portio(kobj); -+ struct uio_port *port = portio->port; -+ struct portio_sysfs_entry *entry; -+ -+ entry = container_of(attr, struct portio_sysfs_entry, attr); -+ -+ if (!entry->show) -+ return -EIO; -+ -+ return entry->show(port, buf); -+} -+ -+static struct sysfs_ops portio_sysfs_ops = { -+ .show = portio_type_show, -+}; -+ -+static struct kobj_type portio_attr_type = { -+ .release = portio_release, -+ .sysfs_ops = &portio_sysfs_ops, -+ .default_attrs = portio_attrs, -+}; -+ - static ssize_t show_name(struct device *dev, - struct device_attribute *attr, char *buf) - { -@@ -177,10 +255,13 @@ static struct attribute_group uio_attr_g - static int uio_dev_add_attributes(struct uio_device *idev) - { - int ret; -- int mi; -+ int mi, pi; - int map_found = 0; -+ int portio_found = 0; - struct uio_mem *mem; - struct uio_map *map; -+ struct uio_port *port; -+ struct uio_portio *portio; - - ret = sysfs_create_group(&idev->dev->kobj, &uio_attr_grp); - if (ret) -@@ -195,25 +276,58 @@ static int uio_dev_add_attributes(struct - idev->map_dir = kobject_create_and_add("maps", - &idev->dev->kobj); - if (!idev->map_dir) -- goto err; -+ goto err_map; - } - map = kzalloc(sizeof(*map), GFP_KERNEL); - if (!map) -- goto err; -+ goto err_map; - kobject_init(&map->kobj, &map_attr_type); - map->mem = mem; - mem->map = map; - ret = kobject_add(&map->kobj, idev->map_dir, "map%d", mi); - if (ret) -- goto err; -+ goto err_map; - ret = kobject_uevent(&map->kobj, KOBJ_ADD); - if (ret) -- goto err; -+ goto err_map; -+ } -+ -+ for (pi = 0; pi < MAX_UIO_PORT_REGIONS; pi++) { -+ port = &idev->info->port[pi]; -+ if (port->size == 0) -+ break; -+ if (!portio_found) { -+ portio_found = 1; -+ idev->portio_dir = kobject_create_and_add("portio", -+ &idev->dev->kobj); -+ if (!idev->portio_dir) -+ goto err_portio; -+ } -+ portio = kzalloc(sizeof(*portio), GFP_KERNEL); -+ if (!portio) -+ goto err_portio; -+ kobject_init(&portio->kobj, &portio_attr_type); -+ portio->port = port; -+ port->portio = portio; -+ ret = kobject_add(&portio->kobj, idev->portio_dir, -+ "port%d", pi); -+ if (ret) -+ goto err_portio; -+ ret = kobject_uevent(&portio->kobj, KOBJ_ADD); -+ if (ret) -+ goto err_portio; - } - - return 0; - --err: -+err_portio: -+ for (pi--; pi >= 0; pi--) { -+ port = &idev->info->port[pi]; -+ portio = port->portio; -+ kobject_put(&portio->kobj); -+ } -+ kobject_put(idev->portio_dir); -+err_map: - for (mi--; mi>=0; mi--) { - mem = &idev->info->mem[mi]; - map = mem->map; -@@ -228,15 +342,26 @@ err_group: - - static void uio_dev_del_attributes(struct uio_device *idev) - { -- int mi; -+ int i; - struct uio_mem *mem; -- for (mi = 0; mi < MAX_UIO_MAPS; mi++) { -- mem = &idev->info->mem[mi]; -+ struct uio_port *port; -+ -+ for (i = 0; i < MAX_UIO_MAPS; i++) { -+ mem = &idev->info->mem[i]; - if (mem->size == 0) - break; - kobject_put(&mem->map->kobj); - } - kobject_put(idev->map_dir); -+ -+ for (i = 0; i < MAX_UIO_PORT_REGIONS; i++) { -+ port = &idev->info->port[i]; -+ if (port->size == 0) -+ break; -+ kobject_put(&port->portio->kobj); -+ } -+ kobject_put(idev->portio_dir); -+ - sysfs_remove_group(&idev->dev->kobj, &uio_attr_grp); - } - ---- a/include/linux/uio_driver.h -+++ b/include/linux/uio_driver.h -@@ -38,6 +38,24 @@ struct uio_mem { - - #define MAX_UIO_MAPS 5 - -+struct uio_portio; -+ -+/** -+ * struct uio_port - description of a UIO port region -+ * @start: start of port region -+ * @size: size of port region -+ * @porttype: type of port (see UIO_PORT_* below) -+ * @portio: for use by the UIO core only. -+ */ -+struct uio_port { -+ unsigned long start; -+ unsigned long size; -+ int porttype; -+ struct uio_portio *portio; -+}; -+ -+#define MAX_UIO_PORT_REGIONS 5 -+ - struct uio_device; - - /** -@@ -46,6 +64,7 @@ struct uio_device; - * @name: device name - * @version: device driver version - * @mem: list of mappable memory regions, size==0 for end of list -+ * @port: list of port regions, size==0 for end of list - * @irq: interrupt number or UIO_IRQ_CUSTOM - * @irq_flags: flags for request_irq() - * @priv: optional private data -@@ -60,6 +79,7 @@ struct uio_info { - char *name; - char *version; - struct uio_mem mem[MAX_UIO_MAPS]; -+ struct uio_port port[MAX_UIO_PORT_REGIONS]; - long irq; - unsigned long irq_flags; - void *priv; -@@ -92,4 +112,10 @@ extern void uio_event_notify(struct uio_ - #define UIO_MEM_LOGICAL 2 - #define UIO_MEM_VIRTUAL 3 - -+/* defines for uio_port->porttype */ -+#define UIO_PORT_NONE 0 -+#define UIO_PORT_X86 1 -+#define UIO_PORT_GPIO 2 -+#define UIO_PORT_OTHER 3 -+ - #endif /* _LINUX_UIO_DRIVER_H_ */ diff --git a/driver-core/uio-uio_pdrv_genirq-allow-custom-irq_flags.patch b/driver-core/uio-uio_pdrv_genirq-allow-custom-irq_flags.patch deleted file mode 100644 index c088f02c2dd6b6..00000000000000 --- a/driver-core/uio-uio_pdrv_genirq-allow-custom-irq_flags.patch +++ /dev/null @@ -1,41 +0,0 @@ -From vapier@gentoo.org Fri Oct 31 09:59:50 2008 -From: Mike Frysinger <vapier@gentoo.org> -Date: Wed, 29 Oct 2008 18:35:52 -0400 -Subject: UIO: uio_pdrv_genirq: allow custom irq_flags -To: hjk@linutronix.de, gregkh@suse.de, damm@igel.co.jp -Message-ID: <1225319752-659-1-git-send-email-vapier@gentoo.org> - - -I can't think of a reason why the driver prevents people from setting any -custom bits in their platform device, but I can think of some reasons for -allowing custom flags. Like setting the IRQF_TRIGGER_... bits. - -Signed-off-by: Mike Frysinger <vapier@gentoo.org> -Signed-off-by: Hans J. Koch <hjk@linutronix.de> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/uio/uio_pdrv_genirq.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - ---- a/drivers/uio/uio_pdrv_genirq.c -+++ b/drivers/uio/uio_pdrv_genirq.c -@@ -81,7 +81,8 @@ static int uio_pdrv_genirq_probe(struct - goto bad0; - } - -- if (uioinfo->handler || uioinfo->irqcontrol || uioinfo->irq_flags) { -+ if (uioinfo->handler || uioinfo->irqcontrol || -+ uioinfo->irq_flags & IRQF_SHARED) { - dev_err(&pdev->dev, "interrupt configuration error\n"); - goto bad0; - } -@@ -132,7 +133,7 @@ static int uio_pdrv_genirq_probe(struct - * Interrupt sharing is not supported. - */ - -- uioinfo->irq_flags = IRQF_DISABLED; -+ uioinfo->irq_flags |= IRQF_DISABLED; - uioinfo->handler = uio_pdrv_genirq_handler; - uioinfo->irqcontrol = uio_pdrv_genirq_irqcontrol; - uioinfo->priv = priv; diff --git a/driver-core/uio-use-pci_ioremap_bar-in-drivers-uio.patch b/driver-core/uio-use-pci_ioremap_bar-in-drivers-uio.patch deleted file mode 100644 index 0442e8684bbe81..00000000000000 --- a/driver-core/uio-use-pci_ioremap_bar-in-drivers-uio.patch +++ /dev/null @@ -1,36 +0,0 @@ -From hjk@linutronix.de Mon Oct 27 11:23:22 2008 -From: Arjan van de Ven <arjan@linux.intel.com> -Date: Tue, 21 Oct 2008 11:17:51 +0200 -Subject: UIO: use pci_ioremap_bar() in drivers/uio -To: Arjan van de Ven <arjan@infradead.org> -Cc: hjk@linutronix.de, tglx@tglx.de, Greg KH <gregkh@suse.de>, LKML <linux-kernel@vger.kernel.org> -Message-ID: <20081021091750.GA2966@local> -Content-Disposition: inline - -From: Arjan van de Ven <arjan@linux.intel.com> - -Use the newly introduced pci_ioremap_bar() function in drivers/uio. -pci_ioremap_bar() just takes a pci device and a bar number, with the goal -of making it really hard to get wrong, while also having a central place -to stick sanity checks. - -Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> -Signed-off-by: Hans J. Koch <hjk@linutronix.de> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/uio/uio_cif.c | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - ---- a/drivers/uio/uio_cif.c -+++ b/drivers/uio/uio_cif.c -@@ -57,8 +57,7 @@ static int __devinit hilscher_pci_probe( - info->mem[0].addr = pci_resource_start(dev, 0); - if (!info->mem[0].addr) - goto out_release; -- info->mem[0].internal_addr = ioremap(pci_resource_start(dev, 0), -- pci_resource_len(dev, 0)); -+ info->mem[0].internal_addr = pci_ioremap_bar(dev, 0); - if (!info->mem[0].internal_addr) - goto out_release; - diff --git a/driver-core/virtio-do-not-statically-allocate-root-device.patch b/driver-core/virtio-do-not-statically-allocate-root-device.patch deleted file mode 100644 index edcf273dd23971..00000000000000 --- a/driver-core/virtio-do-not-statically-allocate-root-device.patch +++ /dev/null @@ -1,77 +0,0 @@ -From markmc@redhat.com Thu Dec 18 16:14:44 2008 -From: Mark McLoughlin <markmc@redhat.com> -Date: Mon, 15 Dec 2008 12:58:27 +0000 -Subject: virtio: do not statically allocate root device -To: Greg KH <gregkh@suse.de> -Cc: Rusty Russell <rusty@rustcorp.com.au>, Anthony Liguori <aliguori@us.ibm.com>, Kay Sievers <kay.sievers@vrfy.org>, Cornelia Huck <cornelia.huck@de.ibm.com>, Mark McLoughlin <markmc@redhat.com> -Message-ID: <1229345909-27229-2-git-send-email-markmc@redhat.com> - - -We shouldn't be statically allocating the root device object, -so dynamically allocate it using root_device_register() -instead. - -Also avoids this warning from 'rmmod virtio_pci': - - Device 'virtio-pci' does not have a release() function, it is broken and must be fixed - -Signed-off-by: Mark McLoughlin <markmc@redhat.com> -Cc: Anthony Liguori <aliguori@us.ibm.com> -Acked-by: Rusty Russell <rusty@rustcorp.com.au> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/virtio/virtio_pci.c | 17 +++++++---------- - 1 file changed, 7 insertions(+), 10 deletions(-) - ---- a/drivers/virtio/virtio_pci.c -+++ b/drivers/virtio/virtio_pci.c -@@ -73,10 +73,7 @@ MODULE_DEVICE_TABLE(pci, virtio_pci_id_t - /* A PCI device has it's own struct device and so does a virtio device so - * we create a place for the virtio devices to show up in sysfs. I think it - * would make more sense for virtio to not insist on having it's own device. */ --static struct device virtio_pci_root = { -- .parent = NULL, -- .init_name = "virtio-pci", --}; -+static struct device *virtio_pci_root; - - /* Convert a generic virtio device to our structure */ - static struct virtio_pci_device *to_vp_device(struct virtio_device *vdev) -@@ -343,7 +340,7 @@ static int __devinit virtio_pci_probe(st - if (vp_dev == NULL) - return -ENOMEM; - -- vp_dev->vdev.dev.parent = &virtio_pci_root; -+ vp_dev->vdev.dev.parent = virtio_pci_root; - vp_dev->vdev.dev.release = virtio_pci_release_dev; - vp_dev->vdev.config = &virtio_pci_config_ops; - vp_dev->pci_dev = pci_dev; -@@ -437,13 +434,13 @@ static int __init virtio_pci_init(void) - { - int err; - -- err = device_register(&virtio_pci_root); -- if (err) -- return err; -+ virtio_pci_root = root_device_register("virtio-pci"); -+ if (IS_ERR(virtio_pci_root)) -+ return PTR_ERR(virtio_pci_root); - - err = pci_register_driver(&virtio_pci_driver); - if (err) -- device_unregister(&virtio_pci_root); -+ device_unregister(virtio_pci_root); - - return err; - } -@@ -452,8 +449,8 @@ module_init(virtio_pci_init); - - static void __exit virtio_pci_exit(void) - { -- device_unregister(&virtio_pci_root); - pci_unregister_driver(&virtio_pci_driver); -+ root_device_unregister(virtio_pci_root); - } - - module_exit(virtio_pci_exit); |
