aboutsummaryrefslogtreecommitdiffstats
diff options
-rw-r--r--driver-core.current/modules-fix-module-notes-kobject-leak.patch58
-rw-r--r--driver-core/debug-introduce-a-dev_warn-function.patch40
-rw-r--r--driver-core/debug-use-dev_warn-rather-than-warn_on-in-device_pm_add.patch36
-rw-r--r--driver-core/device-create-block-convert-device_create_drvdata-to-device_create.patch94
-rw-r--r--driver-core/device-create-char-convert-device_create_drvdata-to-device_create.patch301
-rw-r--r--driver-core/device-create-ide-convert-device_create_drvdata-to-device_create.patch52
-rw-r--r--driver-core/device-create-ieee1394-convert-device_create_drvdata-to-device_create.patch69
-rw-r--r--driver-core/device-create-infiniband-convert-device_create_drvdata-to-device_create.patch94
-rw-r--r--driver-core/device-create-misc-convert-device_create_drvdata-to-device_create.patch293
-rw-r--r--driver-core/device-create-net-convert-device_create_drvdata-to-device_create.patch63
-rw-r--r--driver-core/device-create-remove-device_create_drvdata.patch27
-rw-r--r--driver-core/device-create-s390-convert-device_create_drvdata-to-device_create.patch96
-rw-r--r--driver-core/device-create-scsi-convert-device_create_drvdata-to-device_create.patch99
-rw-r--r--driver-core/device-create-sound-convert-device_create_drvdata-to-device_create.patch93
-rw-r--r--driver-core/device-create-usb-convert-device_create_drvdata-to-device_create.patch138
-rw-r--r--driver-core/device-create-video-convert-device_create_drvdata-to-device_create.patch64
-rw-r--r--driver-core/device-model-do-a-quickcheck-for-driver-binding-before-doing-an-expensive-check.patch54
-rw-r--r--driver-core/driver-core-add-bus_sort_breadthfirst-function.patch159
-rw-r--r--driver-core/driver-core-basic-infrastructure-for-per-module-dynamic-debug-messages.patch946
-rw-r--r--driver-core/driver-core-clarify-device-cleanup.patch71
-rw-r--r--driver-core/driver-core-fix-cleanup-in-device_create_vargs.patch33
-rw-r--r--driver-core/driver-core-make-bus_find_device_by_name-more-robust.patch33
-rw-r--r--driver-core/driver-core-make-struct-platform_pm_ops-static.patch30
-rw-r--r--driver-core/drivers-firmware-iscsi_ibft.c-make-3-functions-static.patch65
-rw-r--r--driver-core/kobject-cleanup-kobject_rename-and-config_sysfs.patch105
-rw-r--r--driver-core/kobject-fix-kobject_rename-and-config_sysfs.patch125
-rw-r--r--driver-core/net-convert-the-phy_device-file-to-use-bus_find_device_by_name.patch46
-rw-r--r--driver-core/platform-add-new-device-registration-helper.patch94
-rw-r--r--driver-core/pm-simplify-the-new-suspend-hibernation-framework-for-devices.patch28
-rw-r--r--driver-core/pnp-create-device-attributes-via-default-device-attributes.patch133
-rw-r--r--driver-core/sysfs-crash-debugging.patch117
-rw-r--r--driver-core/sysfs-fix-deadlock.patch196
-rw-r--r--driver-core/sysfs-make-dir-and-name-args-to-sysfs_notify-const.patch58
-rw-r--r--driver-core/sysfs-support-sysfs_notify-from-atomic-context-with-new-sysfs_notify_dirent.patch202
-rw-r--r--driver-core/sysfs-use-ilookup5-instead-of-ilookup5_nowait.patch62
-rw-r--r--driver-core/uio-add-alignment-warnings-for-uio-mem.patch50
-rw-r--r--driver-core/uio-add-automata-sercos3-pci-card-support.patch304
-rw-r--r--driver-core/uio-change-driver-name-of-uio_pdrv.patch33
-rw-r--r--driver-core/uio-fix-mapping-of-logical-and-virtual-memory.patch54
-rw-r--r--driver-core/usb-gadget-link-fixes-for-cdc-composite-gadget.patch106
-rw-r--r--driver-core/usb-gadget-link-fixes-for-gadget-zero.patch166
-rw-r--r--driver-core/usb-gadget-link-fixes-for-midi-gadget.patch60
-rw-r--r--driver-core/usb-gadget-link-fixes-for-network-gadget.patch969
-rw-r--r--driver-core/usb-gadget-link-fixes-for-printer-gadget.patch60
-rw-r--r--driver-core/usb-gadget-link-fixes-for-serial-gadget.patch63
-rw-r--r--driver-core/usb-gadget-link-fixes-for-storage-gadget.patch58
-rw-r--r--driver-core/usb-turn-dev_warn-warn_on-combos-into-dev_warn.patch69
-rw-r--r--gregkh/sysrq-u-laptop.patch2
-rw-r--r--series66
-rw-r--r--staging/staging-add-maintainers-entry.patch2
-rw-r--r--staging/staging-add-taint_crap-for-all-drivers-staging-code.patch45
-rw-r--r--usb/usb-ehci-fix-remote-wakeup-support-for-arc-tdi-core.patch6
-rw-r--r--usb/usb-ehci-log-a-warning-if-ehci-hcd-is-not-loaded-first.patch8
-rw-r--r--usb/usb-ehci-ohci-uhci-remove-version-numbers.patch8
-rw-r--r--usb/usb-hub.c-add-initial_descriptor_timeout-module-parameter-for-usbcore.patch2
-rw-r--r--usb/usb-remove-code-associated-with-config_ppc_merge.patch2
-rw-r--r--usb/usb-remove-info-macro-from-usb-input-drivers.patch6
-rw-r--r--usb/usb-remove-warn-macro-from-usb-input-drivers.patch6
-rw-r--r--version2
59 files changed, 62 insertions, 6259 deletions
diff --git a/driver-core.current/modules-fix-module-notes-kobject-leak.patch b/driver-core.current/modules-fix-module-notes-kobject-leak.patch
deleted file mode 100644
index 7dd20cce952f08..00000000000000
--- a/driver-core.current/modules-fix-module-notes-kobject-leak.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From adobriyan@gmail.com Tue Sep 23 13:16:36 2008
-From: Alexey Dobriyan <adobriyan@gmail.com>
-Date: Tue, 23 Sep 2008 23:51:11 +0400
-Subject: modules: fix module "notes" kobject leak
-To: Greg KH <gregkh@suse.de>
-Cc: linux-kernel@vger.kernel.org, akpm@osdl.org
-Message-ID: <20080923195111.GA22247@x200.localdomain>
-Content-Disposition: inline
-
-Fix "notes" kobject leak
-
-It happens every rmmod if KALLSYMS=y and SYSFS=y.
-
- # modprobe foo
-
-kobject: 'foo' (ffffffffa00743d0): kobject_add_internal: parent: 'module', set: 'module'
-kobject: 'holders' (ffff88017e7c5770): kobject_add_internal: parent: 'foo', set: '<NULL>'
-kobject: 'foo' (ffffffffa00743d0): kobject_uevent_env
-kobject: 'foo' (ffffffffa00743d0): fill_kobj_path: path = '/module/foo'
-kobject: 'notes' (ffff88017fa9b668): kobject_add_internal: parent: 'foo', set: '<NULL>'
- ^^^^^
-
- # rmmod foo
-
-kobject: 'holders' (ffff88017e7c5770): kobject_cleanup
-kobject: 'holders' (ffff88017e7c5770): auto cleanup kobject_del
-kobject: 'holders' (ffff88017e7c5770): calling ktype release
-kobject: (ffff88017e7c5770): dynamic_kobj_release
-kobject: 'holders': free name
-kobject: 'foo' (ffffffffa00743d0): kobject_cleanup
-kobject: 'foo' (ffffffffa00743d0): does not have a release() function, it is broken and must be fixed.
-kobject: 'foo' (ffffffffa00743d0): auto cleanup 'remove' event
-kobject: 'foo' (ffffffffa00743d0): kobject_uevent_env
-kobject: 'foo' (ffffffffa00743d0): fill_kobj_path: path = '/module/foo'
-kobject: 'foo' (ffffffffa00743d0): auto cleanup kobject_del
-kobject: 'foo': free name
-
- [whooops]
-
-Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
-Cc: stable <stable@kernel.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- kernel/module.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/kernel/module.c
-+++ b/kernel/module.c
-@@ -1173,7 +1173,7 @@ static void free_notes_attrs(struct modu
- while (i-- > 0)
- sysfs_remove_bin_file(notes_attrs->dir,
- &notes_attrs->attrs[i]);
-- kobject_del(notes_attrs->dir);
-+ kobject_put(notes_attrs->dir);
- }
- kfree(notes_attrs);
- }
diff --git a/driver-core/debug-introduce-a-dev_warn-function.patch b/driver-core/debug-introduce-a-dev_warn-function.patch
deleted file mode 100644
index 66da97353830c6..00000000000000
--- a/driver-core/debug-introduce-a-dev_warn-function.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From arjan@infradead.org Tue Sep 23 15:53:52 2008
-From: Arjan van de Ven <arjan@linux.intel.com>
-Date: Sat, 20 Sep 2008 19:08:39 -0700
-Subject: debug: Introduce a dev_WARN() function
-To: Greg KH <greg@kroah.com>
-Message-ID: <20080920190839.720b9602@infradead.org>
-
-
-From: Arjan van de Ven <arjan@linux.intel.com>
-
-in the line of dev_printk(), this patch introduces a dev_WARN() function,
-that takes a struct device and then a printk format/args set of arguments.
-Unlike dev_printk(), the effect is that of WARN() in that a full warning
-message (including filename/line, module list, versions and a backtrace)
-is printed in addition to the device name and the arguments.
-
-Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- include/linux/device.h | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
---- a/include/linux/device.h
-+++ b/include/linux/device.h
-@@ -570,6 +570,14 @@ extern const char *dev_driver_string(con
- ({ if (0) dev_printk(KERN_DEBUG, dev, format, ##arg); 0; })
- #endif
-
-+/*
-+ * dev_WARN() acts like dev_printk(), but with the key difference
-+ * of using a WARN/WARN_ON to get the message out, including the
-+ * file/line information and a backtrace.
-+ */
-+#define dev_WARN(dev, format, arg...) \
-+ WARN(1, "Device: %s\n" format, dev_driver_string(dev), ## arg);
-+
- /* Create alias, so I can be autoloaded. */
- #define MODULE_ALIAS_CHARDEV(major,minor) \
- MODULE_ALIAS("char-major-" __stringify(major) "-" __stringify(minor))
diff --git a/driver-core/debug-use-dev_warn-rather-than-warn_on-in-device_pm_add.patch b/driver-core/debug-use-dev_warn-rather-than-warn_on-in-device_pm_add.patch
deleted file mode 100644
index 6d0dfeaab94393..00000000000000
--- a/driver-core/debug-use-dev_warn-rather-than-warn_on-in-device_pm_add.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From arjan@infradead.org Tue Sep 23 15:55:25 2008
-From: Arjan van de Ven <arjan@linux.intel.com>
-Date: Sat, 20 Sep 2008 19:09:00 -0700
-Subject: debug: use dev_WARN() rather than WARN_ON() in device_pm_add()
-To: Greg KH <greg@kroah.com>
-Message-ID: <20080920190900.6d4ab35a@infradead.org>
-
-From: Arjan van de Ven <arjan@linux.intel.com>
-
-device_pm_add() has a WARN_ON that is showing relatively high on
-kerneloops.org, but unfortunately the WARN_ON is less than useful
-in that it doesn't print any information about what device is causing
-the issue.
-
-This patch fixes this by turning the WARN_ON() into the newly
-introduces dev_WARN() which will print information about the
-device in question.
-
-Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/base/power/main.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/base/power/main.c
-+++ b/drivers/base/power/main.c
-@@ -83,7 +83,7 @@ void device_pm_add(struct device *dev)
- * transition is in progress in order to avoid leaving them
- * unhandled down the road
- */
-- WARN_ON(true);
-+ dev_WARN(dev, "Parentless device registered during a PM transaction\n");
- }
-
- list_add_tail(&dev->power.entry, &dpm_list);
diff --git a/driver-core/device-create-block-convert-device_create_drvdata-to-device_create.patch b/driver-core/device-create-block-convert-device_create_drvdata-to-device_create.patch
deleted file mode 100644
index 3c6e6ff83bd8a8..00000000000000
--- a/driver-core/device-create-block-convert-device_create_drvdata-to-device_create.patch
+++ /dev/null
@@ -1,94 +0,0 @@
-From foo@baz Tue Apr 9 12:12:43 2002
-Date: Mon, 21 Jul 2008 20:03:34 -0700
-To: Greg KH <greg@kroah.com>
-From: Greg Kroah-Hartman <gregkh@suse.de>
-Subject: device create: block: convert device_create_drvdata to device_create
-
-From: Greg Kroah-Hartman <gregkh@suse.de>
-
-Now that device_create() has been audited, rename things back to the
-original call to be sane.
-
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
----
- block/bsg.c | 3 +--
- drivers/block/aoe/aoechr.c | 6 +++---
- drivers/block/paride/pg.c | 5 ++---
- drivers/block/paride/pt.c | 10 ++++------
- drivers/block/pktcdvd.c | 5 ++---
- 5 files changed, 12 insertions(+), 17 deletions(-)
-
---- a/block/bsg.c
-+++ b/block/bsg.c
-@@ -1024,8 +1024,7 @@ int bsg_register_queue(struct request_qu
- bcd->release = release;
- kref_init(&bcd->ref);
- dev = MKDEV(bsg_major, bcd->minor);
-- class_dev = device_create_drvdata(bsg_class, parent, dev, NULL,
-- "%s", devname);
-+ class_dev = device_create(bsg_class, parent, dev, NULL, "%s", devname);
- if (IS_ERR(class_dev)) {
- ret = PTR_ERR(class_dev);
- goto put_dev;
---- a/drivers/block/aoe/aoechr.c
-+++ b/drivers/block/aoe/aoechr.c
-@@ -284,9 +284,9 @@ aoechr_init(void)
- return PTR_ERR(aoe_class);
- }
- for (i = 0; i < ARRAY_SIZE(chardevs); ++i)
-- device_create_drvdata(aoe_class, NULL,
-- MKDEV(AOE_MAJOR, chardevs[i].minor),
-- NULL, chardevs[i].name);
-+ device_create(aoe_class, NULL,
-+ MKDEV(AOE_MAJOR, chardevs[i].minor), NULL,
-+ chardevs[i].name);
-
- return 0;
- }
---- a/drivers/block/paride/pg.c
-+++ b/drivers/block/paride/pg.c
-@@ -686,9 +686,8 @@ static int __init pg_init(void)
- for (unit = 0; unit < PG_UNITS; unit++) {
- struct pg *dev = &devices[unit];
- if (dev->present)
-- device_create_drvdata(pg_class, NULL,
-- MKDEV(major, unit), NULL,
-- "pg%u", unit);
-+ device_create(pg_class, NULL, MKDEV(major, unit), NULL,
-+ "pg%u", unit);
- }
- err = 0;
- goto out;
---- a/drivers/block/paride/pt.c
-+++ b/drivers/block/paride/pt.c
-@@ -979,12 +979,10 @@ static int __init pt_init(void)
-
- for (unit = 0; unit < PT_UNITS; unit++)
- if (pt[unit].present) {
-- device_create_drvdata(pt_class, NULL,
-- MKDEV(major, unit), NULL,
-- "pt%d", unit);
-- device_create_drvdata(pt_class, NULL,
-- MKDEV(major, unit + 128), NULL,
-- "pt%dn", unit);
-+ device_create(pt_class, NULL, MKDEV(major, unit), NULL,
-+ "pt%d", unit);
-+ device_create(pt_class, NULL, MKDEV(major, unit + 128),
-+ NULL, "pt%dn", unit);
- }
- goto out;
-
---- a/drivers/block/pktcdvd.c
-+++ b/drivers/block/pktcdvd.c
-@@ -302,9 +302,8 @@ static struct kobj_type kobj_pkt_type_wq
- static void pkt_sysfs_dev_new(struct pktcdvd_device *pd)
- {
- if (class_pktcdvd) {
-- pd->dev = device_create_drvdata(class_pktcdvd, NULL,
-- pd->pkt_dev, NULL,
-- "%s", pd->name);
-+ pd->dev = device_create(class_pktcdvd, NULL, pd->pkt_dev, NULL,
-+ "%s", pd->name);
- if (IS_ERR(pd->dev))
- pd->dev = NULL;
- }
diff --git a/driver-core/device-create-char-convert-device_create_drvdata-to-device_create.patch b/driver-core/device-create-char-convert-device_create_drvdata-to-device_create.patch
deleted file mode 100644
index 78fc6f89e20a15..00000000000000
--- a/driver-core/device-create-char-convert-device_create_drvdata-to-device_create.patch
+++ /dev/null
@@ -1,301 +0,0 @@
-From foo@baz Tue Apr 9 12:12:43 2002
-Date: Mon, 21 Jul 2008 20:03:34 -0700
-To: Greg KH <greg@kroah.com>
-From: Greg Kroah-Hartman <gregkh@suse.de>
-Subject: device create: char: convert device_create_drvdata to device_create
-
-From: Greg Kroah-Hartman <gregkh@suse.de>
-
-Now that device_create() has been audited, rename things back to the
-original call to be sane.
-
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/char/bsr.c | 5 ++---
- drivers/char/dsp56k.c | 4 ++--
- drivers/char/ip2/ip2main.c | 12 ++++++------
- drivers/char/ipmi/ipmi_devintf.c | 2 +-
- drivers/char/istallion.c | 5 ++---
- drivers/char/lp.c | 4 ++--
- drivers/char/mem.c | 6 +++---
- drivers/char/misc.c | 4 ++--
- drivers/char/pcmcia/cm4000_cs.c | 2 +-
- drivers/char/pcmcia/cm4040_cs.c | 3 +--
- drivers/char/ppdev.c | 5 ++---
- drivers/char/raw.c | 7 +++----
- drivers/char/snsc.c | 4 ++--
- drivers/char/stallion.c | 4 ++--
- drivers/char/tty_io.c | 2 +-
- drivers/char/vc_screen.c | 12 ++++++------
- drivers/char/viotape.c | 8 ++++----
- drivers/char/xilinx_hwicap/xilinx_hwicap.c | 3 +--
- 18 files changed, 43 insertions(+), 49 deletions(-)
-
---- a/drivers/char/bsr.c
-+++ b/drivers/char/bsr.c
-@@ -229,9 +229,8 @@ static int bsr_create_devs(struct device
- if (result)
- goto out_err;
-
-- cur->bsr_device = device_create_drvdata(bsr_class, NULL,
-- cur->bsr_dev,
-- cur, cur->bsr_name);
-+ cur->bsr_device = device_create(bsr_class, NULL, cur->bsr_dev,
-+ cur, cur->bsr_name);
- if (!cur->bsr_device) {
- printk(KERN_ERR "device_create failed for %s\n",
- cur->bsr_name);
---- a/drivers/char/dsp56k.c
-+++ b/drivers/char/dsp56k.c
-@@ -508,8 +508,8 @@ static int __init dsp56k_init_driver(voi
- err = PTR_ERR(dsp56k_class);
- goto out_chrdev;
- }
-- device_create_drvdata(dsp56k_class, NULL, MKDEV(DSP56K_MAJOR, 0),
-- NULL, "dsp56k");
-+ device_create(dsp56k_class, NULL, MKDEV(DSP56K_MAJOR, 0), NULL,
-+ "dsp56k");
-
- printk(banner);
- goto out;
---- a/drivers/char/ip2/ip2main.c
-+++ b/drivers/char/ip2/ip2main.c
-@@ -745,12 +745,12 @@ static int __init ip2_loadmain(void)
-
- pB = i2BoardPtrTable[i];
- if (pB != NULL) {
-- device_create_drvdata(ip2_class, NULL,
-- MKDEV(IP2_IPL_MAJOR, 4 * i),
-- NULL, "ipl%d", i);
-- device_create_drvdata(ip2_class, NULL,
-- MKDEV(IP2_IPL_MAJOR, 4 * i + 1),
-- NULL, "stat%d", i);
-+ device_create(ip2_class, NULL,
-+ MKDEV(IP2_IPL_MAJOR, 4 * i),
-+ NULL, "ipl%d", i);
-+ device_create(ip2_class, NULL,
-+ MKDEV(IP2_IPL_MAJOR, 4 * i + 1),
-+ NULL, "stat%d", i);
-
- for (box = 0; box < ABS_MAX_BOXES; box++)
- for (j = 0; j < ABS_BIGGEST_BOX; j++)
---- a/drivers/char/ipmi/ipmi_devintf.c
-+++ b/drivers/char/ipmi/ipmi_devintf.c
-@@ -871,7 +871,7 @@ static void ipmi_new_smi(int if_num, str
- entry->dev = dev;
-
- mutex_lock(&reg_list_mutex);
-- device_create_drvdata(ipmi_class, device, dev, NULL, "ipmi%d", if_num);
-+ device_create(ipmi_class, device, dev, NULL, "ipmi%d", if_num);
- list_add(&entry->link, &reg_list);
- mutex_unlock(&reg_list_mutex);
- }
---- a/drivers/char/istallion.c
-+++ b/drivers/char/istallion.c
-@@ -4600,9 +4600,8 @@ static int __init istallion_module_init(
-
- istallion_class = class_create(THIS_MODULE, "staliomem");
- for (i = 0; i < 4; i++)
-- device_create_drvdata(istallion_class, NULL,
-- MKDEV(STL_SIOMEMMAJOR, i),
-- NULL, "staliomem%d", i);
-+ device_create(istallion_class, NULL, MKDEV(STL_SIOMEMMAJOR, i),
-+ NULL, "staliomem%d", i);
-
- return 0;
- err_deinit:
---- a/drivers/char/lp.c
-+++ b/drivers/char/lp.c
-@@ -813,8 +813,8 @@ static int lp_register(int nr, struct pa
- if (reset)
- lp_reset(nr);
-
-- device_create_drvdata(lp_class, port->dev, MKDEV(LP_MAJOR, nr), NULL,
-- "lp%d", nr);
-+ device_create(lp_class, port->dev, MKDEV(LP_MAJOR, nr), NULL,
-+ "lp%d", nr);
-
- printk(KERN_INFO "lp%d: using %s (%s).\n", nr, port->name,
- (port->irq == PARPORT_IRQ_NONE)?"polling":"interrupt-driven");
---- a/drivers/char/mem.c
-+++ b/drivers/char/mem.c
-@@ -992,9 +992,9 @@ static int __init chr_dev_init(void)
-
- mem_class = class_create(THIS_MODULE, "mem");
- for (i = 0; i < ARRAY_SIZE(devlist); i++)
-- device_create_drvdata(mem_class, NULL,
-- MKDEV(MEM_MAJOR, devlist[i].minor),
-- NULL, devlist[i].name);
-+ device_create(mem_class, NULL,
-+ MKDEV(MEM_MAJOR, devlist[i].minor), NULL,
-+ devlist[i].name);
-
- return 0;
- }
---- a/drivers/char/misc.c
-+++ b/drivers/char/misc.c
-@@ -217,8 +217,8 @@ int misc_register(struct miscdevice * mi
- misc_minors[misc->minor >> 3] |= 1 << (misc->minor & 7);
- dev = MKDEV(MISC_MAJOR, misc->minor);
-
-- misc->this_device = device_create_drvdata(misc_class, misc->parent,
-- dev, NULL, "%s", misc->name);
-+ misc->this_device = device_create(misc_class, misc->parent, dev, NULL,
-+ "%s", misc->name);
- if (IS_ERR(misc->this_device)) {
- err = PTR_ERR(misc->this_device);
- goto out;
---- a/drivers/char/pcmcia/cm4000_cs.c
-+++ b/drivers/char/pcmcia/cm4000_cs.c
-@@ -1871,7 +1871,7 @@ static int cm4000_probe(struct pcmcia_de
- return ret;
- }
-
-- device_create_drvdata(cmm_class, NULL, MKDEV(major, i), NULL, "cmm%d", i);
-+ device_create(cmm_class, NULL, MKDEV(major, i), NULL, "cmm%d", i);
-
- return 0;
- }
---- a/drivers/char/pcmcia/cm4040_cs.c
-+++ b/drivers/char/pcmcia/cm4040_cs.c
-@@ -637,8 +637,7 @@ static int reader_probe(struct pcmcia_de
- return ret;
- }
-
-- device_create_drvdata(cmx_class, NULL, MKDEV(major, i), NULL,
-- "cmx%d", i);
-+ device_create(cmx_class, NULL, MKDEV(major, i), NULL, "cmx%d", i);
-
- return 0;
- }
---- a/drivers/char/ppdev.c
-+++ b/drivers/char/ppdev.c
-@@ -760,9 +760,8 @@ static const struct file_operations pp_f
-
- static void pp_attach(struct parport *port)
- {
-- device_create_drvdata(ppdev_class, port->dev,
-- MKDEV(PP_MAJOR, port->number),
-- NULL, "parport%d", port->number);
-+ device_create(ppdev_class, port->dev, MKDEV(PP_MAJOR, port->number),
-+ NULL, "parport%d", port->number);
- }
-
- static void pp_detach(struct parport *port)
---- a/drivers/char/raw.c
-+++ b/drivers/char/raw.c
-@@ -131,8 +131,8 @@ raw_ioctl(struct inode *inode, struct fi
- static void bind_device(struct raw_config_request *rq)
- {
- device_destroy(raw_class, MKDEV(RAW_MAJOR, rq->raw_minor));
-- device_create_drvdata(raw_class, NULL, MKDEV(RAW_MAJOR, rq->raw_minor),
-- NULL, "raw%d", rq->raw_minor);
-+ device_create(raw_class, NULL, MKDEV(RAW_MAJOR, rq->raw_minor), NULL,
-+ "raw%d", rq->raw_minor);
- }
-
- /*
-@@ -283,8 +283,7 @@ static int __init raw_init(void)
- ret = PTR_ERR(raw_class);
- goto error_region;
- }
-- device_create_drvdata(raw_class, NULL, MKDEV(RAW_MAJOR, 0), NULL,
-- "rawctl");
-+ device_create(raw_class, NULL, MKDEV(RAW_MAJOR, 0), NULL, "rawctl");
-
- return 0;
-
---- a/drivers/char/snsc.c
-+++ b/drivers/char/snsc.c
-@@ -444,8 +444,8 @@ scdrv_init(void)
- continue;
- }
-
-- device_create_drvdata(snsc_class, NULL, dev, NULL,
-- "%s", devname);
-+ device_create(snsc_class, NULL, dev, NULL,
-+ "%s", devname);
-
- ia64_sn_irtr_intr_enable(scd->scd_nasid,
- 0 /*ignored */ ,
---- a/drivers/char/stallion.c
-+++ b/drivers/char/stallion.c
-@@ -4743,8 +4743,8 @@ static int __init stallion_module_init(v
- if (IS_ERR(stallion_class))
- printk("STALLION: failed to create class\n");
- for (i = 0; i < 4; i++)
-- device_create_drvdata(stallion_class, NULL, MKDEV(STL_SIOMEMMAJOR, i),
-- NULL, "staliomem%d", i);
-+ device_create(stallion_class, NULL, MKDEV(STL_SIOMEMMAJOR, i),
-+ NULL, "staliomem%d", i);
-
- return 0;
- err_unrtty:
---- a/drivers/char/tty_io.c
-+++ b/drivers/char/tty_io.c
-@@ -2850,7 +2850,7 @@ struct device *tty_register_device(struc
- else
- tty_line_name(driver, index, name);
-
-- return device_create_drvdata(tty_class, device, dev, NULL, name);
-+ return device_create(tty_class, device, dev, NULL, name);
- }
- EXPORT_SYMBOL(tty_register_device);
-
---- a/drivers/char/vc_screen.c
-+++ b/drivers/char/vc_screen.c
-@@ -481,10 +481,10 @@ static struct class *vc_class;
-
- void vcs_make_sysfs(struct tty_struct *tty)
- {
-- device_create_drvdata(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 1),
-- NULL, "vcs%u", tty->index + 1);
-- device_create_drvdata(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 129),
-- NULL, "vcsa%u", tty->index + 1);
-+ device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 1), NULL,
-+ "vcs%u", tty->index + 1);
-+ device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 129), NULL,
-+ "vcsa%u", tty->index + 1);
- }
-
- void vcs_remove_sysfs(struct tty_struct *tty)
-@@ -499,7 +499,7 @@ int __init vcs_init(void)
- panic("unable to get major %d for vcs device", VCS_MAJOR);
- vc_class = class_create(THIS_MODULE, "vc");
-
-- device_create_drvdata(vc_class, NULL, MKDEV(VCS_MAJOR, 0), NULL, "vcs");
-- device_create_drvdata(vc_class, NULL, MKDEV(VCS_MAJOR, 128), NULL, "vcsa");
-+ device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 0), NULL, "vcs");
-+ device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 128), NULL, "vcsa");
- return 0;
- }
---- a/drivers/char/viotape.c
-+++ b/drivers/char/viotape.c
-@@ -886,10 +886,10 @@ static int viotape_probe(struct vio_dev
- state[i].cur_part = 0;
- for (j = 0; j < MAX_PARTITIONS; ++j)
- state[i].part_stat_rwi[j] = VIOT_IDLE;
-- device_create_drvdata(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i),
-- NULL, "iseries!vt%d", i);
-- device_create_drvdata(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i | 0x80),
-- NULL, "iseries!nvt%d", i);
-+ device_create(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i), NULL,
-+ "iseries!vt%d", i);
-+ device_create(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i | 0x80), NULL,
-+ "iseries!nvt%d", i);
- printk(VIOTAPE_KERN_INFO "tape iseries/vt%d is iSeries "
- "resource %10.10s type %4.4s, model %3.3s\n",
- i, viotape_unitinfo[i].rsrcname,
---- a/drivers/char/xilinx_hwicap/xilinx_hwicap.c
-+++ b/drivers/char/xilinx_hwicap/xilinx_hwicap.c
-@@ -657,8 +657,7 @@ static int __devinit hwicap_setup(struct
- goto failed3;
- }
-
-- device_create_drvdata(icap_class, dev, devt, NULL,
-- "%s%d", DRIVER_NAME, id);
-+ device_create(icap_class, dev, devt, NULL, "%s%d", DRIVER_NAME, id);
- return 0; /* success */
-
- failed3:
diff --git a/driver-core/device-create-ide-convert-device_create_drvdata-to-device_create.patch b/driver-core/device-create-ide-convert-device_create_drvdata-to-device_create.patch
deleted file mode 100644
index a0ecc438f19f3d..00000000000000
--- a/driver-core/device-create-ide-convert-device_create_drvdata-to-device_create.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From foo@baz Tue Apr 9 12:12:43 2002
-Date: Mon, 21 Jul 2008 20:03:34 -0700
-To: Greg KH <greg@kroah.com>
-From: Greg Kroah-Hartman <gregkh@suse.de>
-Subject: device create: ide: convert device_create_drvdata to device_create
-
-From: Greg Kroah-Hartman <gregkh@suse.de>
-
-Now that device_create() has been audited, rename things back to the
-original call to be sane.
-
-Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/ide/ide-probe.c | 4 ++--
- drivers/ide/ide-tape.c | 11 +++++------
- 2 files changed, 7 insertions(+), 8 deletions(-)
-
---- a/drivers/ide/ide-probe.c
-+++ b/drivers/ide/ide-probe.c
-@@ -657,8 +657,8 @@ static int ide_register_port(ide_hwif_t
- goto out;
- }
-
-- hwif->portdev = device_create_drvdata(ide_port_class, &hwif->gendev,
-- MKDEV(0, 0), hwif, hwif->name);
-+ hwif->portdev = device_create(ide_port_class, &hwif->gendev,
-+ MKDEV(0, 0), hwif, hwif->name);
- if (IS_ERR(hwif->portdev)) {
- ret = PTR_ERR(hwif->portdev);
- device_unregister(&hwif->gendev);
---- a/drivers/ide/ide-tape.c
-+++ b/drivers/ide/ide-tape.c
-@@ -2420,12 +2420,11 @@ static int ide_tape_probe(ide_drive_t *d
-
- idetape_setup(drive, tape, minor);
-
-- device_create_drvdata(idetape_sysfs_class, &drive->gendev,
-- MKDEV(IDETAPE_MAJOR, minor), NULL,
-- "%s", tape->name);
-- device_create_drvdata(idetape_sysfs_class, &drive->gendev,
-- MKDEV(IDETAPE_MAJOR, minor + 128), NULL,
-- "n%s", tape->name);
-+ device_create(idetape_sysfs_class, &drive->gendev,
-+ MKDEV(IDETAPE_MAJOR, minor), NULL, "%s", tape->name);
-+ device_create(idetape_sysfs_class, &drive->gendev,
-+ MKDEV(IDETAPE_MAJOR, minor + 128), NULL,
-+ "n%s", tape->name);
-
- g->fops = &idetape_block_ops;
- ide_register_region(g);
diff --git a/driver-core/device-create-ieee1394-convert-device_create_drvdata-to-device_create.patch b/driver-core/device-create-ieee1394-convert-device_create_drvdata-to-device_create.patch
deleted file mode 100644
index 53989adc5b05fc..00000000000000
--- a/driver-core/device-create-ieee1394-convert-device_create_drvdata-to-device_create.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From foo@baz Tue Apr 9 12:12:43 2002
-Date: Mon, 21 Jul 2008 20:03:34 -0700
-To: Greg KH <greg@kroah.com>
-From: Greg Kroah-Hartman <gregkh@suse.de>
-Subject: device create: ieee1394: convert device_create_drvdata to device_create
-
-From: Greg Kroah-Hartman <gregkh@suse.de>
-
-Now that device_create() has been audited, rename things back to the
-original call to be sane.
-
-Cc: Ben Collins <ben.collins@ubuntu.com>
-Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/ieee1394/dv1394.c | 8 ++++----
- drivers/ieee1394/raw1394.c | 8 ++++----
- drivers/ieee1394/video1394.c | 5 ++---
- 3 files changed, 10 insertions(+), 11 deletions(-)
-
---- a/drivers/ieee1394/dv1394.c
-+++ b/drivers/ieee1394/dv1394.c
-@@ -2296,10 +2296,10 @@ static void dv1394_add_host(struct hpsb_
-
- ohci = (struct ti_ohci *)host->hostdata;
-
-- device_create_drvdata(hpsb_protocol_class, NULL,
-- MKDEV(IEEE1394_MAJOR,
-- IEEE1394_MINOR_BLOCK_DV1394 * 16 + (id<<2)), NULL,
-- "dv1394-%d", id);
-+ device_create(hpsb_protocol_class, NULL,
-+ MKDEV(IEEE1394_MAJOR,
-+ IEEE1394_MINOR_BLOCK_DV1394 * 16 + (id<<2)),
-+ NULL, "dv1394-%d", id);
-
- dv1394_init(ohci, DV1394_NTSC, MODE_RECEIVE);
- dv1394_init(ohci, DV1394_NTSC, MODE_TRANSMIT);
---- a/drivers/ieee1394/raw1394.c
-+++ b/drivers/ieee1394/raw1394.c
-@@ -3010,10 +3010,10 @@ static int __init init_raw1394(void)
- hpsb_register_highlevel(&raw1394_highlevel);
-
- if (IS_ERR
-- (device_create_drvdata(
-- hpsb_protocol_class, NULL,
-- MKDEV(IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_RAW1394 * 16),
-- NULL, RAW1394_DEVICE_NAME))) {
-+ (device_create(hpsb_protocol_class, NULL,
-+ MKDEV(IEEE1394_MAJOR,
-+ IEEE1394_MINOR_BLOCK_RAW1394 * 16),
-+ NULL, RAW1394_DEVICE_NAME))) {
- ret = -EFAULT;
- goto out_unreg;
- }
---- a/drivers/ieee1394/video1394.c
-+++ b/drivers/ieee1394/video1394.c
-@@ -1341,9 +1341,8 @@ static void video1394_add_host (struct h
- hpsb_set_hostinfo_key(&video1394_highlevel, host, ohci->host->id);
-
- minor = IEEE1394_MINOR_BLOCK_VIDEO1394 * 16 + ohci->host->id;
-- device_create_drvdata(hpsb_protocol_class, NULL,
-- MKDEV(IEEE1394_MAJOR, minor), NULL,
-- "%s-%d", VIDEO1394_DRIVER_NAME, ohci->host->id);
-+ device_create(hpsb_protocol_class, NULL, MKDEV(IEEE1394_MAJOR, minor),
-+ NULL, "%s-%d", VIDEO1394_DRIVER_NAME, ohci->host->id);
- }
-
-
diff --git a/driver-core/device-create-infiniband-convert-device_create_drvdata-to-device_create.patch b/driver-core/device-create-infiniband-convert-device_create_drvdata-to-device_create.patch
deleted file mode 100644
index 6d8a8bec75a5dc..00000000000000
--- a/driver-core/device-create-infiniband-convert-device_create_drvdata-to-device_create.patch
+++ /dev/null
@@ -1,94 +0,0 @@
-From foo@baz Tue Apr 9 12:12:43 2002
-Date: Mon, 21 Jul 2008 20:03:34 -0700
-To: Greg KH <greg@kroah.com>
-From: Greg Kroah-Hartman <gregkh@suse.de>
-Subject: device create: infiniband: convert device_create_drvdata to device_create
-
-From: Greg Kroah-Hartman <gregkh@suse.de>
-
-Now that device_create() has been audited, rename things back to the
-original call to be sane.
-
-Cc: Roland Dreier <rolandd@cisco.com>
-Cc: Sean Hefty <sean.hefty@intel.com>
-Cc: Hal Rosenstock <hal.rosenstock@gmail.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
----
- drivers/infiniband/core/cm.c | 6 +++---
- drivers/infiniband/core/user_mad.c | 12 ++++++------
- drivers/infiniband/core/uverbs_main.c | 9 +++------
- drivers/infiniband/hw/ipath/ipath_file_ops.c | 2 +-
- 4 files changed, 13 insertions(+), 16 deletions(-)
-
---- a/drivers/infiniband/core/cm.c
-+++ b/drivers/infiniband/core/cm.c
-@@ -3691,9 +3691,9 @@ static void cm_add_one(struct ib_device
- cm_dev->ib_device = ib_device;
- cm_get_ack_delay(cm_dev);
-
-- cm_dev->device = device_create_drvdata(&cm_class, &ib_device->dev,
-- MKDEV(0, 0), NULL,
-- "%s", ib_device->name);
-+ cm_dev->device = device_create(&cm_class, &ib_device->dev,
-+ MKDEV(0, 0), NULL,
-+ "%s", ib_device->name);
- if (!cm_dev->device) {
- kfree(cm_dev);
- return;
---- a/drivers/infiniband/core/user_mad.c
-+++ b/drivers/infiniband/core/user_mad.c
-@@ -1016,9 +1016,9 @@ static int ib_umad_init_port(struct ib_d
- if (cdev_add(port->cdev, base_dev + port->dev_num, 1))
- goto err_cdev;
-
-- port->dev = device_create_drvdata(umad_class, device->dma_device,
-- port->cdev->dev, port,
-- "umad%d", port->dev_num);
-+ port->dev = device_create(umad_class, device->dma_device,
-+ port->cdev->dev, port,
-+ "umad%d", port->dev_num);
- if (IS_ERR(port->dev))
- goto err_cdev;
-
-@@ -1036,9 +1036,9 @@ static int ib_umad_init_port(struct ib_d
- if (cdev_add(port->sm_cdev, base_dev + port->dev_num + IB_UMAD_MAX_PORTS, 1))
- goto err_sm_cdev;
-
-- port->sm_dev = device_create_drvdata(umad_class, device->dma_device,
-- port->sm_cdev->dev, port,
-- "issm%d", port->dev_num);
-+ port->sm_dev = device_create(umad_class, device->dma_device,
-+ port->sm_cdev->dev, port,
-+ "issm%d", port->dev_num);
- if (IS_ERR(port->sm_dev))
- goto err_sm_cdev;
-
---- a/drivers/infiniband/core/uverbs_main.c
-+++ b/drivers/infiniband/core/uverbs_main.c
-@@ -764,12 +764,9 @@ static void ib_uverbs_add_one(struct ib_
- if (cdev_add(uverbs_dev->cdev, IB_UVERBS_BASE_DEV + uverbs_dev->devnum, 1))
- goto err_cdev;
-
-- uverbs_dev->dev = device_create_drvdata(uverbs_class,
-- device->dma_device,
-- uverbs_dev->cdev->dev,
-- uverbs_dev,
-- "uverbs%d",
-- uverbs_dev->devnum);
-+ uverbs_dev->dev = device_create(uverbs_class, device->dma_device,
-+ uverbs_dev->cdev->dev, uverbs_dev,
-+ "uverbs%d", uverbs_dev->devnum);
- if (IS_ERR(uverbs_dev->dev))
- goto err_cdev;
-
---- a/drivers/infiniband/hw/ipath/ipath_file_ops.c
-+++ b/drivers/infiniband/hw/ipath/ipath_file_ops.c
-@@ -2455,7 +2455,7 @@ static int init_cdev(int minor, char *na
- goto err_cdev;
- }
-
-- device = device_create_drvdata(ipath_class, NULL, dev, NULL, name);
-+ device = device_create(ipath_class, NULL, dev, NULL, name);
-
- if (IS_ERR(device)) {
- ret = PTR_ERR(device);
diff --git a/driver-core/device-create-misc-convert-device_create_drvdata-to-device_create.patch b/driver-core/device-create-misc-convert-device_create_drvdata-to-device_create.patch
deleted file mode 100644
index 94c319508bfe11..00000000000000
--- a/driver-core/device-create-misc-convert-device_create_drvdata-to-device_create.patch
+++ /dev/null
@@ -1,293 +0,0 @@
-From foo@baz Tue Apr 9 12:12:43 2002
-Date: Mon, 21 Jul 2008 20:03:34 -0700
-To: Greg KH <greg@kroah.com>
-From: Greg Kroah-Hartman <gregkh@suse.de>
-Subject: device create: misc: convert device_create_drvdata to device_create
-
-From: Greg Kroah-Hartman <gregkh@suse.de>
-
-Now that device_create() has been audited, rename things back to the
-original call to be sane.
-
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- arch/mips/kernel/rtlx.c | 4 ++--
- arch/mips/sibyte/common/sb_tbprof.c | 3 +--
- arch/x86/kernel/cpuid.c | 4 ++--
- arch/x86/kernel/msr.c | 4 ++--
- drivers/dca/dca-sysfs.c | 8 +++-----
- drivers/hid/hidraw.c | 5 ++---
- drivers/hwmon/hwmon.c | 4 ++--
- drivers/i2c/i2c-dev.c | 6 +++---
- drivers/isdn/capi/capi.c | 3 +--
- drivers/leds/led-class.c | 4 ++--
- drivers/macintosh/adb.c | 3 +--
- drivers/media/dvb/dvb-core/dvbdev.c | 2 +-
- drivers/misc/phantom.c | 6 +++---
- drivers/mtd/mtdchar.c | 12 +++++-------
- drivers/power/power_supply_core.c | 4 ++--
- drivers/spi/spidev.c | 7 +++----
- drivers/uio/uio.c | 6 +++---
- fs/coda/psdev.c | 5 ++---
- 18 files changed, 40 insertions(+), 50 deletions(-)
-
---- a/arch/mips/kernel/rtlx.c
-+++ b/arch/mips/kernel/rtlx.c
-@@ -522,8 +522,8 @@ static int __init rtlx_module_init(void)
- atomic_set(&channel_wqs[i].in_open, 0);
- mutex_init(&channel_wqs[i].mutex);
-
-- dev = device_create_drvdata(mt_class, NULL, MKDEV(major, i),
-- NULL, "%s%d", module_name, i);
-+ dev = device_create(mt_class, NULL, MKDEV(major, i), NULL,
-+ "%s%d", module_name, i);
- if (IS_ERR(dev)) {
- err = PTR_ERR(dev);
- goto out_chrdev;
---- a/arch/mips/sibyte/common/sb_tbprof.c
-+++ b/arch/mips/sibyte/common/sb_tbprof.c
-@@ -576,8 +576,7 @@ static int __init sbprof_tb_init(void)
-
- tb_class = tbc;
-
-- dev = device_create_drvdata(tbc, NULL, MKDEV(SBPROF_TB_MAJOR, 0),
-- NULL, "tb");
-+ dev = device_create(tbc, NULL, MKDEV(SBPROF_TB_MAJOR, 0), NULL, "tb");
- if (IS_ERR(dev)) {
- err = PTR_ERR(dev);
- goto out_class;
---- a/arch/x86/kernel/cpuid.c
-+++ b/arch/x86/kernel/cpuid.c
-@@ -147,8 +147,8 @@ static __cpuinit int cpuid_device_create
- {
- struct device *dev;
-
-- dev = device_create_drvdata(cpuid_class, NULL, MKDEV(CPUID_MAJOR, cpu),
-- NULL, "cpu%d", cpu);
-+ dev = device_create(cpuid_class, NULL, MKDEV(CPUID_MAJOR, cpu), NULL,
-+ "cpu%d", cpu);
- return IS_ERR(dev) ? PTR_ERR(dev) : 0;
- }
-
---- a/arch/x86/kernel/msr.c
-+++ b/arch/x86/kernel/msr.c
-@@ -163,8 +163,8 @@ static int __cpuinit msr_device_create(i
- {
- struct device *dev;
-
-- dev = device_create_drvdata(msr_class, NULL, MKDEV(MSR_MAJOR, cpu),
-- NULL, "msr%d", cpu);
-+ dev = device_create(msr_class, NULL, MKDEV(MSR_MAJOR, cpu), NULL,
-+ "msr%d", cpu);
- return IS_ERR(dev) ? PTR_ERR(dev) : 0;
- }
-
---- a/drivers/dca/dca-sysfs.c
-+++ b/drivers/dca/dca-sysfs.c
-@@ -15,9 +15,8 @@ int dca_sysfs_add_req(struct dca_provide
- struct device *cd;
- static int req_count;
-
-- cd = device_create_drvdata(dca_class, dca->cd,
-- MKDEV(0, slot + 1), NULL,
-- "requester%d", req_count++);
-+ cd = device_create(dca_class, dca->cd, MKDEV(0, slot + 1), NULL,
-+ "requester%d", req_count++);
- if (IS_ERR(cd))
- return PTR_ERR(cd);
- return 0;
-@@ -48,8 +47,7 @@ idr_try_again:
- return err;
- }
-
-- cd = device_create_drvdata(dca_class, dev, MKDEV(0, 0), NULL,
-- "dca%d", dca->id);
-+ cd = device_create(dca_class, dev, MKDEV(0, 0), NULL, "dca%d", dca->id);
- if (IS_ERR(cd)) {
- spin_lock(&dca_idr_lock);
- idr_remove(&dca_idr, dca->id);
---- a/drivers/hid/hidraw.c
-+++ b/drivers/hid/hidraw.c
-@@ -326,9 +326,8 @@ int hidraw_connect(struct hid_device *hi
- goto out;
- }
-
-- dev->dev = device_create_drvdata(hidraw_class, NULL,
-- MKDEV(hidraw_major, minor), NULL,
-- "%s%d", "hidraw", minor);
-+ dev->dev = device_create(hidraw_class, NULL, MKDEV(hidraw_major, minor),
-+ NULL, "%s%d", "hidraw", minor);
-
- if (IS_ERR(dev->dev)) {
- spin_lock(&minors_lock);
---- a/drivers/hwmon/hwmon.c
-+++ b/drivers/hwmon/hwmon.c
-@@ -55,8 +55,8 @@ again:
- return ERR_PTR(err);
-
- id = id & MAX_ID_MASK;
-- hwdev = device_create_drvdata(hwmon_class, dev, MKDEV(0, 0), NULL,
-- HWMON_ID_FORMAT, id);
-+ hwdev = device_create(hwmon_class, dev, MKDEV(0, 0), NULL,
-+ HWMON_ID_FORMAT, id);
-
- if (IS_ERR(hwdev)) {
- spin_lock(&idr_lock);
---- a/drivers/i2c/i2c-dev.c
-+++ b/drivers/i2c/i2c-dev.c
-@@ -521,9 +521,9 @@ static int i2cdev_attach_adapter(struct
- return PTR_ERR(i2c_dev);
-
- /* register this i2c device with the driver core */
-- i2c_dev->dev = device_create_drvdata(i2c_dev_class, &adap->dev,
-- MKDEV(I2C_MAJOR, adap->nr),
-- NULL, "i2c-%d", adap->nr);
-+ i2c_dev->dev = device_create(i2c_dev_class, &adap->dev,
-+ MKDEV(I2C_MAJOR, adap->nr), NULL,
-+ "i2c-%d", adap->nr);
- if (IS_ERR(i2c_dev->dev)) {
- res = PTR_ERR(i2c_dev->dev);
- goto error;
---- a/drivers/isdn/capi/capi.c
-+++ b/drivers/isdn/capi/capi.c
-@@ -1553,8 +1553,7 @@ static int __init capi_init(void)
- return PTR_ERR(capi_class);
- }
-
-- device_create_drvdata(capi_class, NULL, MKDEV(capi_major, 0), NULL,
-- "capi");
-+ device_create(capi_class, NULL, MKDEV(capi_major, 0), NULL, "capi");
-
- #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
- if (capinc_tty_init() < 0) {
---- a/drivers/leds/led-class.c
-+++ b/drivers/leds/led-class.c
-@@ -103,8 +103,8 @@ int led_classdev_register(struct device
- {
- int rc;
-
-- led_cdev->dev = device_create_drvdata(leds_class, parent, 0, led_cdev,
-- "%s", led_cdev->name);
-+ led_cdev->dev = device_create(leds_class, parent, 0, led_cdev,
-+ "%s", led_cdev->name);
- if (IS_ERR(led_cdev->dev))
- return PTR_ERR(led_cdev->dev);
-
---- a/drivers/macintosh/adb.c
-+++ b/drivers/macintosh/adb.c
-@@ -862,8 +862,7 @@ adbdev_init(void)
- adb_dev_class = class_create(THIS_MODULE, "adb");
- if (IS_ERR(adb_dev_class))
- return;
-- device_create_drvdata(adb_dev_class, NULL, MKDEV(ADB_MAJOR, 0), NULL,
-- "adb");
-+ device_create(adb_dev_class, NULL, MKDEV(ADB_MAJOR, 0), NULL, "adb");
-
- platform_device_register(&adb_pfdev);
- platform_driver_probe(&adb_pfdrv, adb_dummy_probe);
---- a/drivers/media/dvb/dvb-core/dvbdev.c
-+++ b/drivers/media/dvb/dvb-core/dvbdev.c
-@@ -233,7 +233,7 @@ int dvb_register_device(struct dvb_adapt
-
- mutex_unlock(&dvbdev_register_lock);
-
-- clsdev = device_create_drvdata(dvb_class, adap->device,
-+ clsdev = device_create(dvb_class, adap->device,
- MKDEV(DVB_MAJOR, nums2minor(adap->num, type, id)),
- NULL, "dvb%d.%s%d", adap->num, dnames[type], id);
- if (IS_ERR(clsdev)) {
---- a/drivers/misc/phantom.c
-+++ b/drivers/misc/phantom.c
-@@ -399,9 +399,9 @@ static int __devinit phantom_probe(struc
- goto err_irq;
- }
-
-- if (IS_ERR(device_create_drvdata(phantom_class, &pdev->dev,
-- MKDEV(phantom_major, minor),
-- NULL, "phantom%u", minor)))
-+ if (IS_ERR(device_create(phantom_class, &pdev->dev,
-+ MKDEV(phantom_major, minor), NULL,
-+ "phantom%u", minor)))
- dev_err(&pdev->dev, "can't create device\n");
-
- pci_set_drvdata(pdev, pht);
---- a/drivers/mtd/mtdchar.c
-+++ b/drivers/mtd/mtdchar.c
-@@ -26,13 +26,11 @@ static void mtd_notify_add(struct mtd_in
- if (!mtd)
- return;
-
-- device_create_drvdata(mtd_class, NULL,
-- MKDEV(MTD_CHAR_MAJOR, mtd->index*2),
-- NULL, "mtd%d", mtd->index);
--
-- device_create_drvdata(mtd_class, NULL,
-- MKDEV(MTD_CHAR_MAJOR, mtd->index*2+1),
-- NULL, "mtd%dro", mtd->index);
-+ device_create(mtd_class, NULL, MKDEV(MTD_CHAR_MAJOR, mtd->index*2),
-+ NULL, "mtd%d", mtd->index);
-+
-+ device_create(mtd_class, NULL, MKDEV(MTD_CHAR_MAJOR, mtd->index*2+1),
-+ NULL, "mtd%dro", mtd->index);
- }
-
- static void mtd_notify_remove(struct mtd_info* mtd)
---- a/drivers/power/power_supply_core.c
-+++ b/drivers/power/power_supply_core.c
-@@ -91,8 +91,8 @@ int power_supply_register(struct device
- {
- int rc = 0;
-
-- psy->dev = device_create_drvdata(power_supply_class, parent, 0,
-- psy, "%s", psy->name);
-+ psy->dev = device_create(power_supply_class, parent, 0, psy,
-+ "%s", psy->name);
- if (IS_ERR(psy->dev)) {
- rc = PTR_ERR(psy->dev);
- goto dev_create_failed;
---- a/drivers/spi/spidev.c
-+++ b/drivers/spi/spidev.c
-@@ -583,10 +583,9 @@ static int spidev_probe(struct spi_devic
- struct device *dev;
-
- spidev->devt = MKDEV(SPIDEV_MAJOR, minor);
-- dev = device_create_drvdata(spidev_class, &spi->dev,
-- spidev->devt, spidev,
-- "spidev%d.%d",
-- spi->master->bus_num, spi->chip_select);
-+ dev = device_create(spidev_class, &spi->dev, spidev->devt,
-+ spidev, "spidev%d.%d",
-+ spi->master->bus_num, spi->chip_select);
- status = IS_ERR(dev) ? PTR_ERR(dev) : 0;
- } else {
- dev_dbg(&spi->dev, "no minor number available!\n");
---- a/drivers/uio/uio.c
-+++ b/drivers/uio/uio.c
-@@ -682,9 +682,9 @@ int __uio_register_device(struct module
- if (ret)
- goto err_get_minor;
-
-- idev->dev = device_create_drvdata(uio_class->class, parent,
-- MKDEV(uio_major, idev->minor), idev,
-- "uio%d", idev->minor);
-+ idev->dev = device_create(uio_class->class, parent,
-+ MKDEV(uio_major, idev->minor), idev,
-+ "uio%d", idev->minor);
- if (IS_ERR(idev->dev)) {
- printk(KERN_ERR "UIO: device register failed\n");
- ret = PTR_ERR(idev->dev);
---- a/fs/coda/psdev.c
-+++ b/fs/coda/psdev.c
-@@ -362,9 +362,8 @@ static int init_coda_psdev(void)
- goto out_chrdev;
- }
- for (i = 0; i < MAX_CODADEVS; i++)
-- device_create_drvdata(coda_psdev_class, NULL,
-- MKDEV(CODA_PSDEV_MAJOR, i),
-- NULL, "cfs%d", i);
-+ device_create(coda_psdev_class, NULL,
-+ MKDEV(CODA_PSDEV_MAJOR, i), NULL, "cfs%d", i);
- coda_sysctl_init();
- goto out;
-
diff --git a/driver-core/device-create-net-convert-device_create_drvdata-to-device_create.patch b/driver-core/device-create-net-convert-device_create_drvdata-to-device_create.patch
deleted file mode 100644
index b51143ba5ae784..00000000000000
--- a/driver-core/device-create-net-convert-device_create_drvdata-to-device_create.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From foo@baz Tue Apr 9 12:12:43 2002
-Date: Mon, 21 Jul 2008 20:03:34 -0700
-To: Greg KH <greg@kroah.com>
-From: Greg Kroah-Hartman <gregkh@suse.de>
-Subject: device create: net: convert device_create_drvdata to device_create
-
-From: Greg Kroah-Hartman <gregkh@suse.de>
-
-Now that device_create() has been audited, rename things back to the
-original call to be sane.
-
-Cc: Jeff Garzik <jgarzik@pobox.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/net/ppp_generic.c | 4 ++--
- drivers/net/wan/cosa.c | 4 ++--
- drivers/net/wireless/mac80211_hwsim.c | 6 +++---
- 3 files changed, 7 insertions(+), 7 deletions(-)
-
---- a/drivers/net/ppp_generic.c
-+++ b/drivers/net/ppp_generic.c
-@@ -866,8 +866,8 @@ static int __init ppp_init(void)
- err = PTR_ERR(ppp_class);
- goto out_chrdev;
- }
-- device_create_drvdata(ppp_class, NULL, MKDEV(PPP_MAJOR, 0),
-- NULL, "ppp");
-+ device_create(ppp_class, NULL, MKDEV(PPP_MAJOR, 0), NULL,
-+ "ppp");
- }
-
- out:
---- a/drivers/net/wan/cosa.c
-+++ b/drivers/net/wan/cosa.c
-@@ -388,8 +388,8 @@ static int __init cosa_init(void)
- goto out_chrdev;
- }
- for (i = 0; i < nr_cards; i++)
-- device_create_drvdata(cosa_class, NULL, MKDEV(cosa_major, i),
-- NULL, "cosa%d", i);
-+ device_create(cosa_class, NULL, MKDEV(cosa_major, i), NULL,
-+ "cosa%d", i);
- err = 0;
- goto out;
-
---- a/drivers/net/wireless/mac80211_hwsim.c
-+++ b/drivers/net/wireless/mac80211_hwsim.c
-@@ -533,11 +533,11 @@ static int __init init_mac80211_hwsim(vo
- data = hw->priv;
- data->hw = hw;
-
-- data->dev = device_create_drvdata(hwsim_class, NULL, 0, hw,
-- "hwsim%d", i);
-+ data->dev = device_create(hwsim_class, NULL, 0, hw,
-+ "hwsim%d", i);
- if (IS_ERR(data->dev)) {
- printk(KERN_DEBUG
-- "mac80211_hwsim: device_create_drvdata "
-+ "mac80211_hwsim: device_create "
- "failed (%ld)\n", PTR_ERR(data->dev));
- err = -ENOMEM;
- goto failed_drvdata;
diff --git a/driver-core/device-create-remove-device_create_drvdata.patch b/driver-core/device-create-remove-device_create_drvdata.patch
deleted file mode 100644
index c5937b454bd180..00000000000000
--- a/driver-core/device-create-remove-device_create_drvdata.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From foo@baz Tue Apr 9 12:12:43 2002
-Date: Mon, 21 Jul 2008 20:03:34 -0700
-To: Greg KH <greg@kroah.com>
-From: Greg Kroah-Hartman <gregkh@suse.de>
-Subject: device create: remove device_create_drvdata
-
-From: Greg Kroah-Hartman <gregkh@suse.de>
-
-Now that the tree is cleaned up, device_create_drvdata can be safely
-removed.
-
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- include/linux/device.h | 1 -
- 1 file changed, 1 deletion(-)
-
---- a/include/linux/device.h
-+++ b/include/linux/device.h
-@@ -502,7 +502,6 @@ extern struct device *device_create(stru
- dev_t devt, void *drvdata,
- const char *fmt, ...)
- __attribute__((format(printf, 5, 6)));
--#define device_create_drvdata device_create
- extern void device_destroy(struct class *cls, dev_t devt);
-
- /*
diff --git a/driver-core/device-create-s390-convert-device_create_drvdata-to-device_create.patch b/driver-core/device-create-s390-convert-device_create_drvdata-to-device_create.patch
deleted file mode 100644
index ce15988540a358..00000000000000
--- a/driver-core/device-create-s390-convert-device_create_drvdata-to-device_create.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From foo@baz Tue Apr 9 12:12:43 2002
-Date: Mon, 21 Jul 2008 20:03:34 -0700
-To: Greg KH <greg@kroah.com>
-From: Greg Kroah-Hartman <gregkh@suse.de>
-Subject: device create: s390: convert device_create_drvdata to device_create
-
-From: Greg Kroah-Hartman <gregkh@suse.de>
-
-Now that device_create() has been audited, rename things back to the
-original call to be sane.
-
-Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
-Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/s390/char/raw3270.c | 14 ++++++--------
- drivers/s390/char/tape_class.c | 6 +++---
- drivers/s390/char/vmlogrdr.c | 8 ++++----
- drivers/s390/char/vmur.c | 5 ++---
- 4 files changed, 15 insertions(+), 18 deletions(-)
-
---- a/drivers/s390/char/raw3270.c
-+++ b/drivers/s390/char/raw3270.c
-@@ -1168,19 +1168,17 @@ static int raw3270_create_attributes(str
- if (rc)
- goto out;
-
-- rp->clttydev = device_create_drvdata(class3270, &rp->cdev->dev,
-- MKDEV(IBM_TTY3270_MAJOR, rp->minor),
-- NULL,
-- "tty%s", dev_name(&rp->cdev->dev));
-+ rp->clttydev = device_create(class3270, &rp->cdev->dev,
-+ MKDEV(IBM_TTY3270_MAJOR, rp->minor), NULL,
-+ "tty%s", dev_name(&rp->cdev->dev));
- if (IS_ERR(rp->clttydev)) {
- rc = PTR_ERR(rp->clttydev);
- goto out_ttydev;
- }
-
-- rp->cltubdev = device_create_drvdata(class3270, &rp->cdev->dev,
-- MKDEV(IBM_FS3270_MAJOR, rp->minor),
-- NULL,
-- "tub%s", dev_name(&rp->cdev->dev));
-+ rp->cltubdev = device_create(class3270, &rp->cdev->dev,
-+ MKDEV(IBM_FS3270_MAJOR, rp->minor), NULL,
-+ "tub%s", dev_name(&rp->cdev->dev));
- if (!IS_ERR(rp->cltubdev))
- goto out;
-
---- a/drivers/s390/char/tape_class.c
-+++ b/drivers/s390/char/tape_class.c
-@@ -69,9 +69,9 @@ struct tape_class_device *register_tape_
- if (rc)
- goto fail_with_cdev;
-
-- tcd->class_device = device_create_drvdata(tape_class, device,
-- tcd->char_device->dev,
-- NULL, "%s", tcd->device_name);
-+ tcd->class_device = device_create(tape_class, device,
-+ tcd->char_device->dev, NULL,
-+ "%s", tcd->device_name);
- rc = IS_ERR(tcd->class_device) ? PTR_ERR(tcd->class_device) : 0;
- if (rc)
- goto fail_with_cdev;
---- a/drivers/s390/char/vmlogrdr.c
-+++ b/drivers/s390/char/vmlogrdr.c
-@@ -747,10 +747,10 @@ static int vmlogrdr_register_device(stru
- device_unregister(dev);
- return ret;
- }
-- priv->class_device = device_create_drvdata(vmlogrdr_class, dev,
-- MKDEV(vmlogrdr_major,
-- priv->minor_num),
-- priv, "%s", dev_name(dev));
-+ priv->class_device = device_create(vmlogrdr_class, dev,
-+ MKDEV(vmlogrdr_major,
-+ priv->minor_num),
-+ priv, "%s", dev_name(dev));
- if (IS_ERR(priv->class_device)) {
- ret = PTR_ERR(priv->class_device);
- priv->class_device=NULL;
---- a/drivers/s390/char/vmur.c
-+++ b/drivers/s390/char/vmur.c
-@@ -896,9 +896,8 @@ static int ur_set_online(struct ccw_devi
- goto fail_free_cdev;
- }
-
-- urd->device = device_create_drvdata(vmur_class, NULL,
-- urd->char_device->dev, NULL,
-- "%s", node_id);
-+ urd->device = device_create(vmur_class, NULL, urd->char_device->dev,
-+ NULL, "%s", node_id);
- if (IS_ERR(urd->device)) {
- rc = PTR_ERR(urd->device);
- TRACE("ur_set_online: device_create rc=%d\n", rc);
diff --git a/driver-core/device-create-scsi-convert-device_create_drvdata-to-device_create.patch b/driver-core/device-create-scsi-convert-device_create_drvdata-to-device_create.patch
deleted file mode 100644
index f9148a634f3791..00000000000000
--- a/driver-core/device-create-scsi-convert-device_create_drvdata-to-device_create.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-From foo@baz Tue Apr 9 12:12:43 2002
-Date: Mon, 21 Jul 2008 20:03:34 -0700
-To: Greg KH <greg@kroah.com>
-From: Greg Kroah-Hartman <gregkh@suse.de>
-Subject: device create: scsi: convert device_create_drvdata to device_create
-
-From: Greg Kroah-Hartman <gregkh@suse.de>
-
-Now that device_create() has been audited, rename things back to the
-original call to be sane.
-
-Cc: James E.J. Bottomley <James.Bottomley@HansenPartnership.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/scsi/ch.c | 6 +++---
- drivers/scsi/dpt_i2o.c | 2 +-
- drivers/scsi/osst.c | 3 ++-
- drivers/scsi/sg.c | 10 ++++------
- drivers/scsi/st.c | 11 ++++-------
- 5 files changed, 14 insertions(+), 18 deletions(-)
-
---- a/drivers/scsi/ch.c
-+++ b/drivers/scsi/ch.c
-@@ -914,9 +914,9 @@ static int ch_probe(struct device *dev)
- ch->minor = minor;
- sprintf(ch->name,"ch%d",ch->minor);
-
-- class_dev = device_create_drvdata(ch_sysfs_class, dev,
-- MKDEV(SCSI_CHANGER_MAJOR, ch->minor),
-- ch, "s%s", ch->name);
-+ class_dev = device_create(ch_sysfs_class, dev,
-+ MKDEV(SCSI_CHANGER_MAJOR, ch->minor), ch,
-+ "s%s", ch->name);
- if (IS_ERR(class_dev)) {
- printk(KERN_WARNING "ch%d: device_create failed\n",
- ch->minor);
---- a/drivers/scsi/dpt_i2o.c
-+++ b/drivers/scsi/dpt_i2o.c
-@@ -271,7 +271,7 @@ rebuild_sys_tab:
- pHba->initialized = TRUE;
- pHba->state &= ~DPTI_STATE_RESET;
- if (adpt_sysfs_class) {
-- struct device *dev = device_create_drvdata(adpt_sysfs_class,
-+ struct device *dev = device_create(adpt_sysfs_class,
- NULL, MKDEV(DPTI_I2O_MAJOR, pHba->unit), NULL,
- "dpti%d", pHba->unit);
- if (IS_ERR(dev)) {
---- a/drivers/scsi/osst.c
-+++ b/drivers/scsi/osst.c
-@@ -5708,7 +5708,8 @@ static int osst_sysfs_add(dev_t dev, str
- struct device *osst_member;
- int err;
-
-- osst_member = device_create_drvdata(osst_sysfs_class, device, dev, STp, "%s", name);
-+ osst_member = device_create(osst_sysfs_class, device, dev, STp,
-+ "%s", name);
- if (IS_ERR(osst_member)) {
- printk(KERN_WARNING "osst :W: Unable to add sysfs class member %s\n", name);
- return PTR_ERR(osst_member);
---- a/drivers/scsi/sg.c
-+++ b/drivers/scsi/sg.c
-@@ -1450,12 +1450,10 @@ sg_add(struct device *cl_dev, struct cla
- if (sg_sysfs_valid) {
- struct device *sg_class_member;
-
-- sg_class_member = device_create_drvdata(sg_sysfs_class,
-- cl_dev->parent,
-- MKDEV(SCSI_GENERIC_MAJOR,
-- sdp->index),
-- sdp,
-- "%s", disk->disk_name);
-+ sg_class_member = device_create(sg_sysfs_class, cl_dev->parent,
-+ MKDEV(SCSI_GENERIC_MAJOR,
-+ sdp->index),
-+ sdp, "%s", disk->disk_name);
- if (IS_ERR(sg_class_member)) {
- printk(KERN_ERR "sg_add: "
- "device_create failed\n");
---- a/drivers/scsi/st.c
-+++ b/drivers/scsi/st.c
-@@ -4428,13 +4428,10 @@ static int do_create_class_files(struct
- snprintf(name, 10, "%s%s%s", rew ? "n" : "",
- STp->disk->disk_name, st_formats[i]);
- st_class_member =
-- device_create_drvdata(st_sysfs_class,
-- &STp->device->sdev_gendev,
-- MKDEV(SCSI_TAPE_MAJOR,
-- TAPE_MINOR(dev_num,
-- mode, rew)),
-- &STp->modes[mode],
-- "%s", name);
-+ device_create(st_sysfs_class, &STp->device->sdev_gendev,
-+ MKDEV(SCSI_TAPE_MAJOR,
-+ TAPE_MINOR(dev_num, mode, rew)),
-+ &STp->modes[mode], "%s", name);
- if (IS_ERR(st_class_member)) {
- printk(KERN_WARNING "st%d: device_create failed\n",
- dev_num);
diff --git a/driver-core/device-create-sound-convert-device_create_drvdata-to-device_create.patch b/driver-core/device-create-sound-convert-device_create_drvdata-to-device_create.patch
deleted file mode 100644
index 839fb53f5f46ef..00000000000000
--- a/driver-core/device-create-sound-convert-device_create_drvdata-to-device_create.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-From foo@baz Tue Apr 9 12:12:43 2002
-Date: Mon, 21 Jul 2008 20:03:34 -0700
-To: Greg KH <greg@kroah.com>
-From: Greg Kroah-Hartman <gregkh@suse.de>
-Subject: device create: sound: convert device_create_drvdata to device_create
-
-From: Greg Kroah-Hartman <gregkh@suse.de>
-
-Now that device_create() has been audited, rename things back to the
-original call to be sane.
-
-Cc: Jaroslav Kysela <perex@perex.cz>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- sound/core/init.c | 6 +++---
- sound/core/sound.c | 5 ++---
- sound/oss/soundcard.c | 15 +++++++--------
- sound/sound_core.c | 5 ++---
- 4 files changed, 14 insertions(+), 17 deletions(-)
-
---- a/sound/core/init.c
-+++ b/sound/core/init.c
-@@ -549,9 +549,9 @@ int snd_card_register(struct snd_card *c
- return -EINVAL;
- #ifndef CONFIG_SYSFS_DEPRECATED
- if (!card->card_dev) {
-- card->card_dev = device_create_drvdata(sound_class, card->dev,
-- MKDEV(0, 0), NULL,
-- "card%i", card->number);
-+ card->card_dev = device_create(sound_class, card->dev,
-+ MKDEV(0, 0), NULL,
-+ "card%i", card->number);
- if (IS_ERR(card->card_dev))
- card->card_dev = NULL;
- }
---- a/sound/core/sound.c
-+++ b/sound/core/sound.c
-@@ -274,9 +274,8 @@ int snd_register_device_for_dev(int type
- return minor;
- }
- snd_minors[minor] = preg;
-- preg->dev = device_create_drvdata(sound_class, device,
-- MKDEV(major, minor),
-- private_data, "%s", name);
-+ preg->dev = device_create(sound_class, device, MKDEV(major, minor),
-+ private_data, "%s", name);
- if (IS_ERR(preg->dev)) {
- snd_minors[minor] = NULL;
- mutex_unlock(&sound_mutex);
---- a/sound/oss/soundcard.c
-+++ b/sound/oss/soundcard.c
-@@ -560,19 +560,18 @@ static int __init oss_init(void)
- sound_dmap_flag = (dmabuf > 0 ? 1 : 0);
-
- for (i = 0; i < ARRAY_SIZE(dev_list); i++) {
-- device_create_drvdata(sound_class, NULL,
-- MKDEV(SOUND_MAJOR, dev_list[i].minor),
-- NULL, "%s", dev_list[i].name);
-+ device_create(sound_class, NULL,
-+ MKDEV(SOUND_MAJOR, dev_list[i].minor), NULL,
-+ "%s", dev_list[i].name);
-
- if (!dev_list[i].num)
- continue;
-
- for (j = 1; j < *dev_list[i].num; j++)
-- device_create_drvdata(sound_class, NULL,
-- MKDEV(SOUND_MAJOR,
-- dev_list[i].minor + (j*0x10)),
-- NULL,
-- "%s%d", dev_list[i].name, j);
-+ device_create(sound_class, NULL,
-+ MKDEV(SOUND_MAJOR,
-+ dev_list[i].minor + (j*0x10)),
-+ NULL, "%s%d", dev_list[i].name, j);
- }
-
- if (sound_nblocks >= 1024)
---- a/sound/sound_core.c
-+++ b/sound/sound_core.c
-@@ -220,9 +220,8 @@ static int sound_insert_unit(struct soun
- else
- sprintf(s->name, "sound/%s%d", name, r / SOUND_STEP);
-
-- device_create_drvdata(sound_class, dev,
-- MKDEV(SOUND_MAJOR, s->unit_minor),
-- NULL, s->name+6);
-+ device_create(sound_class, dev, MKDEV(SOUND_MAJOR, s->unit_minor),
-+ NULL, s->name+6);
- return r;
-
- fail:
diff --git a/driver-core/device-create-usb-convert-device_create_drvdata-to-device_create.patch b/driver-core/device-create-usb-convert-device_create_drvdata-to-device_create.patch
deleted file mode 100644
index 25d61b25c539f9..00000000000000
--- a/driver-core/device-create-usb-convert-device_create_drvdata-to-device_create.patch
+++ /dev/null
@@ -1,138 +0,0 @@
-From foo@baz Tue Apr 9 12:12:43 2002
-Date: Mon, 21 Jul 2008 20:03:34 -0700
-To: Greg KH <greg@kroah.com>
-From: Greg Kroah-Hartman <gregkh@suse.de>
-Subject: device create: usb: convert device_create_drvdata to device_create
-
-From: Greg Kroah-Hartman <gregkh@suse.de>
-
-Now that device_create() has been audited, rename things back to the
-original call to be sane.
-
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/usb/core/devio.c | 6 +++---
- drivers/usb/core/file.c | 6 +++---
- drivers/usb/core/hcd.c | 5 ++---
- drivers/usb/gadget/printer.c | 4 ++--
- drivers/usb/misc/phidgetkit.c | 5 ++---
- drivers/usb/misc/phidgetmotorcontrol.c | 5 ++---
- drivers/usb/misc/phidgetservo.c | 5 ++---
- drivers/usb/mon/mon_bin.c | 6 +++---
- 8 files changed, 19 insertions(+), 23 deletions(-)
-
---- a/drivers/usb/core/devio.c
-+++ b/drivers/usb/core/devio.c
-@@ -1729,9 +1729,9 @@ static int usb_classdev_add(struct usb_d
- {
- struct device *cldev;
-
-- cldev = device_create_drvdata(usb_classdev_class, &dev->dev,
-- dev->dev.devt, NULL, "usbdev%d.%d",
-- dev->bus->busnum, dev->devnum);
-+ cldev = device_create(usb_classdev_class, &dev->dev, dev->dev.devt,
-+ NULL, "usbdev%d.%d", dev->bus->busnum,
-+ dev->devnum);
- if (IS_ERR(cldev))
- return PTR_ERR(cldev);
- dev->usb_classdev = cldev;
---- a/drivers/usb/core/file.c
-+++ b/drivers/usb/core/file.c
-@@ -196,9 +196,9 @@ int usb_register_dev(struct usb_interfac
- ++temp;
- else
- temp = name;
-- intf->usb_dev = device_create_drvdata(usb_class->class, &intf->dev,
-- MKDEV(USB_MAJOR, minor), NULL,
-- "%s", temp);
-+ intf->usb_dev = device_create(usb_class->class, &intf->dev,
-+ MKDEV(USB_MAJOR, minor), NULL,
-+ "%s", temp);
- if (IS_ERR(intf->usb_dev)) {
- down_write(&minor_rwsem);
- usb_minors[intf->minor] = NULL;
---- a/drivers/usb/core/hcd.c
-+++ b/drivers/usb/core/hcd.c
-@@ -818,9 +818,8 @@ static int usb_register_bus(struct usb_b
- set_bit (busnum, busmap.busmap);
- bus->busnum = busnum;
-
-- bus->dev = device_create_drvdata(usb_host_class, bus->controller,
-- MKDEV(0, 0), bus,
-- "usb_host%d", busnum);
-+ bus->dev = device_create(usb_host_class, bus->controller, MKDEV(0, 0),
-+ bus, "usb_host%d", busnum);
- result = PTR_ERR(bus->dev);
- if (IS_ERR(bus->dev))
- goto error_create_class_dev;
---- a/drivers/usb/gadget/printer.c
-+++ b/drivers/usb/gadget/printer.c
-@@ -1360,8 +1360,8 @@ printer_bind(struct usb_gadget *gadget)
-
-
- /* Setup the sysfs files for the printer gadget. */
-- dev->pdev = device_create_drvdata(usb_gadget_class, NULL,
-- g_printer_devno, NULL, "g_printer");
-+ dev->pdev = device_create(usb_gadget_class, NULL, g_printer_devno,
-+ NULL, "g_printer");
- if (IS_ERR(dev->pdev)) {
- ERROR(dev, "Failed to create device: g_printer\n");
- goto fail;
---- a/drivers/usb/misc/phidgetkit.c
-+++ b/drivers/usb/misc/phidgetkit.c
-@@ -595,9 +595,8 @@ static int interfacekit_probe(struct usb
- } while(value);
- kit->dev_no = bit;
-
-- kit->dev = device_create_drvdata(phidget_class, &kit->udev->dev,
-- MKDEV(0, 0), kit,
-- "interfacekit%d", kit->dev_no);
-+ kit->dev = device_create(phidget_class, &kit->udev->dev, MKDEV(0, 0),
-+ kit, "interfacekit%d", kit->dev_no);
- if (IS_ERR(kit->dev)) {
- rc = PTR_ERR(kit->dev);
- kit->dev = NULL;
---- a/drivers/usb/misc/phidgetmotorcontrol.c
-+++ b/drivers/usb/misc/phidgetmotorcontrol.c
-@@ -365,9 +365,8 @@ static int motorcontrol_probe(struct usb
- } while(value);
- mc->dev_no = bit;
-
-- mc->dev = device_create_drvdata(phidget_class, &mc->udev->dev,
-- MKDEV(0, 0), mc,
-- "motorcontrol%d", mc->dev_no);
-+ mc->dev = device_create(phidget_class, &mc->udev->dev, MKDEV(0, 0), mc,
-+ "motorcontrol%d", mc->dev_no);
- if (IS_ERR(mc->dev)) {
- rc = PTR_ERR(mc->dev);
- mc->dev = NULL;
---- a/drivers/usb/misc/phidgetservo.c
-+++ b/drivers/usb/misc/phidgetservo.c
-@@ -275,9 +275,8 @@ servo_probe(struct usb_interface *interf
- } while (value);
- dev->dev_no = bit;
-
-- dev->dev = device_create_drvdata(phidget_class, &dev->udev->dev,
-- MKDEV(0, 0), dev,
-- "servo%d", dev->dev_no);
-+ dev->dev = device_create(phidget_class, &dev->udev->dev, MKDEV(0, 0),
-+ dev, "servo%d", dev->dev_no);
- if (IS_ERR(dev->dev)) {
- rc = PTR_ERR(dev->dev);
- dev->dev = NULL;
---- a/drivers/usb/mon/mon_bin.c
-+++ b/drivers/usb/mon/mon_bin.c
-@@ -1162,9 +1162,9 @@ int mon_bin_add(struct mon_bus *mbus, co
- if (minor >= MON_BIN_MAX_MINOR)
- return 0;
-
-- dev = device_create_drvdata(mon_bin_class, ubus? ubus->controller: NULL,
-- MKDEV(MAJOR(mon_bin_dev0), minor), NULL,
-- "usbmon%d", minor);
-+ dev = device_create(mon_bin_class, ubus ? ubus->controller : NULL,
-+ MKDEV(MAJOR(mon_bin_dev0), minor), NULL,
-+ "usbmon%d", minor);
- if (IS_ERR(dev))
- return 0;
-
diff --git a/driver-core/device-create-video-convert-device_create_drvdata-to-device_create.patch b/driver-core/device-create-video-convert-device_create_drvdata-to-device_create.patch
deleted file mode 100644
index 783096dc72938b..00000000000000
--- a/driver-core/device-create-video-convert-device_create_drvdata-to-device_create.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From foo@baz Tue Apr 9 12:12:43 2002
-Date: Mon, 21 Jul 2008 20:03:34 -0700
-To: Greg KH <greg@kroah.com>
-From: Greg Kroah-Hartman <gregkh@suse.de>
-Subject: device create: video: convert device_create_drvdata to device_create
-
-From: Greg Kroah-Hartman <gregkh@suse.de>
-
-Now that device_create() has been audited, rename things back to the
-original call to be sane.
-
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/video/console/fbcon.c | 4 ++--
- drivers/video/display/display-sysfs.c | 9 +++------
- drivers/video/fbmem.c | 5 ++---
- 3 files changed, 7 insertions(+), 11 deletions(-)
-
---- a/drivers/video/console/fbcon.c
-+++ b/drivers/video/console/fbcon.c
-@@ -3573,8 +3573,8 @@ static int __init fb_console_init(void)
-
- acquire_console_sem();
- fb_register_client(&fbcon_event_notifier);
-- fbcon_device = device_create_drvdata(fb_class, NULL, MKDEV(0, 0),
-- NULL, "fbcon");
-+ fbcon_device = device_create(fb_class, NULL, MKDEV(0, 0), NULL,
-+ "fbcon");
-
- if (IS_ERR(fbcon_device)) {
- printk(KERN_WARNING "Unable to create device "
---- a/drivers/video/display/display-sysfs.c
-+++ b/drivers/video/display/display-sysfs.c
-@@ -153,12 +153,9 @@ struct display_device *display_device_re
- mutex_unlock(&allocated_dsp_lock);
-
- if (!ret) {
-- new_dev->dev = device_create_drvdata(display_class,
-- parent,
-- MKDEV(0,0),
-- new_dev,
-- "display%d",
-- new_dev->idx);
-+ new_dev->dev = device_create(display_class, parent,
-+ MKDEV(0,0), new_dev,
-+ "display%d", new_dev->idx);
- if (!IS_ERR(new_dev->dev)) {
- new_dev->parent = parent;
- new_dev->driver = driver;
---- a/drivers/video/fbmem.c
-+++ b/drivers/video/fbmem.c
-@@ -1443,9 +1443,8 @@ register_framebuffer(struct fb_info *fb_
- break;
- fb_info->node = i;
-
-- fb_info->dev = device_create_drvdata(fb_class, fb_info->device,
-- MKDEV(FB_MAJOR, i), NULL,
-- "fb%d", i);
-+ fb_info->dev = device_create(fb_class, fb_info->device,
-+ MKDEV(FB_MAJOR, i), NULL, "fb%d", i);
- if (IS_ERR(fb_info->dev)) {
- /* Not fatal */
- printk(KERN_WARNING "Unable to create device for framebuffer %d; errno = %ld\n", i, PTR_ERR(fb_info->dev));
diff --git a/driver-core/device-model-do-a-quickcheck-for-driver-binding-before-doing-an-expensive-check.patch b/driver-core/device-model-do-a-quickcheck-for-driver-binding-before-doing-an-expensive-check.patch
deleted file mode 100644
index 23d3f6c210470d..00000000000000
--- a/driver-core/device-model-do-a-quickcheck-for-driver-binding-before-doing-an-expensive-check.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From SRS0+de3def591acb43d0ac0c+1848+infradead.org+arjan@casper.srs.infradead.org Mon Sep 15 10:04:14 2008
-From: Arjan van de Ven <arjan@infradead.org>
-Date: Sun, 14 Sep 2008 08:32:06 -0700
-Subject: device model: Do a quickcheck for driver binding before doing an expensive check
-To: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
-Cc: greg@kroah.com
-Message-ID: <20080914083206.0f42b2a7@infradead.org>
-
-
-
-From: Arjan van de Ven <arjan@linux.intel.com>
-
-This patch adds a quick check for the driver<->device match before
-taking the locks and doin gthe expensive checks. Taking the lock hurts
-in asynchronous boot context where the device lock gets hit; one of the
-init functions takes the lock and goes to do an expensive hardware init;
-the other init functions walk the same PCI list and get stuck on the
-lock as a result.
-
-For the common case, we can know there's no chance whatsoever of a match
-if the device isn't in the drivers ID table... so this patch does that
-check as a best-effort-avoid-the-lock approach.
-
-Bootcharts for before and after can be seen at
-http://www.fenrus.org/before.svg
-http://www.fenrus.org/after.svg
-
-Note the long time "agp_ali_init" takes in the first graph; my laptop
-doesn't even have an ALI chip in it! (the bootgraphs look a bit
-dissimilar, but that's the point, the first one has a bunch of arbitrary
-delays in it that cause it to look very different)
-
-This reduces my kernel boot time by about 20%
-
-Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
-Cc: Alan Stern <stern@rowland.harvard.edu>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/base/dd.c | 3 +++
- 1 file changed, 3 insertions(+)
-
---- a/drivers/base/dd.c
-+++ b/drivers/base/dd.c
-@@ -257,6 +257,9 @@ static int __driver_attach(struct device
- * is an error.
- */
-
-+ if (drv->bus->match && !drv->bus->match(dev, drv))
-+ return 0;
-+
- if (dev->parent) /* Needed for USB */
- down(&dev->parent->sem);
- down(&dev->sem);
diff --git a/driver-core/driver-core-add-bus_sort_breadthfirst-function.patch b/driver-core/driver-core-add-bus_sort_breadthfirst-function.patch
deleted file mode 100644
index 565959aa11b730..00000000000000
--- a/driver-core/driver-core-add-bus_sort_breadthfirst-function.patch
+++ /dev/null
@@ -1,159 +0,0 @@
-From foo@baz Tue Apr 9 12:12:43 2002
-Date: Tue, 26 Aug 2008 11:00:57 -0500
-To: Greg KH <greg@kroah.com>
-From: Greg Kroah-Hartman <gregkh@suse.de>
-Subject: Driver core: add bus_sort_breadthfirst() function
-
-The PCI core wants to reorder the devices in the bus list. So move this
-functionality out of the pci core and into the driver core so that
-anyone else can also do this if needed. This also lets us change how
-struct device is attached to drivers in the future without messing with
-the PCI core.
-
-Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/base/bus.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++++
- drivers/pci/probe.c | 50 ++++---------------------------------------------
- include/linux/device.h | 3 ++
- 3 files changed, 58 insertions(+), 45 deletions(-)
-
---- a/drivers/base/bus.c
-+++ b/drivers/base/bus.c
-@@ -980,6 +980,56 @@ struct klist *bus_get_device_klist(struc
- }
- EXPORT_SYMBOL_GPL(bus_get_device_klist);
-
-+/*
-+ * Yes, this forcably breaks the klist abstraction temporarily. It
-+ * just wants to sort the klist, not change reference counts and
-+ * take/drop locks rapidly in the process. It does all this while
-+ * holding the lock for the list, so objects can't otherwise be
-+ * added/removed while we're swizzling.
-+ */
-+static void device_insertion_sort_klist(struct device *a, struct list_head *list,
-+ int (*compare)(const struct device *a,
-+ const struct device *b))
-+{
-+ struct list_head *pos;
-+ struct klist_node *n;
-+ 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);
-+ if (compare(a, b) <= 0) {
-+ list_move_tail(&a->knode_bus.n_node,
-+ &b->knode_bus.n_node);
-+ return;
-+ }
-+ }
-+ list_move_tail(&a->knode_bus.n_node, list);
-+}
-+
-+void bus_sort_breadthfirst(struct bus_type *bus,
-+ int (*compare)(const struct device *a,
-+ const struct device *b))
-+{
-+ LIST_HEAD(sorted_devices);
-+ struct list_head *pos, *tmp;
-+ struct klist_node *n;
-+ struct device *dev;
-+ struct klist *device_klist;
-+
-+ device_klist = bus_get_device_klist(bus);
-+
-+ 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);
-+ device_insertion_sort_klist(dev, &sorted_devices, compare);
-+ }
-+ list_splice(&sorted_devices, &device_klist->k_list);
-+ spin_unlock(&device_klist->k_lock);
-+}
-+EXPORT_SYMBOL_GPL(bus_sort_breadthfirst);
-+
- int __init buses_init(void)
- {
- bus_kset = kset_create_and_add("bus", &bus_uevent_ops, NULL);
---- a/drivers/pci/probe.c
-+++ b/drivers/pci/probe.c
-@@ -1237,8 +1237,11 @@ EXPORT_SYMBOL(pci_scan_bridge);
- EXPORT_SYMBOL_GPL(pci_scan_child_bus);
- #endif
-
--static int __init pci_sort_bf_cmp(const struct pci_dev *a, const struct pci_dev *b)
-+static int __init pci_sort_bf_cmp(const struct device *d_a, const struct device *d_b)
- {
-+ const struct pci_dev *a = to_pci_dev(d_a);
-+ const struct pci_dev *b = to_pci_dev(d_b);
-+
- if (pci_domain_nr(a->bus) < pci_domain_nr(b->bus)) return -1;
- else if (pci_domain_nr(a->bus) > pci_domain_nr(b->bus)) return 1;
-
-@@ -1251,50 +1254,7 @@ static int __init pci_sort_bf_cmp(const
- return 0;
- }
-
--/*
-- * Yes, this forcably breaks the klist abstraction temporarily. It
-- * just wants to sort the klist, not change reference counts and
-- * take/drop locks rapidly in the process. It does all this while
-- * holding the lock for the list, so objects can't otherwise be
-- * added/removed while we're swizzling.
-- */
--static void __init pci_insertion_sort_klist(struct pci_dev *a, struct list_head *list)
--{
-- struct list_head *pos;
-- struct klist_node *n;
-- struct device *dev;
-- struct pci_dev *b;
--
-- list_for_each(pos, list) {
-- n = container_of(pos, struct klist_node, n_node);
-- dev = container_of(n, struct device, knode_bus);
-- b = to_pci_dev(dev);
-- if (pci_sort_bf_cmp(a, b) <= 0) {
-- list_move_tail(&a->dev.knode_bus.n_node, &b->dev.knode_bus.n_node);
-- return;
-- }
-- }
-- list_move_tail(&a->dev.knode_bus.n_node, list);
--}
--
- void __init pci_sort_breadthfirst(void)
- {
-- LIST_HEAD(sorted_devices);
-- struct list_head *pos, *tmp;
-- struct klist_node *n;
-- struct device *dev;
-- struct pci_dev *pdev;
-- struct klist *device_klist;
--
-- device_klist = bus_get_device_klist(&pci_bus_type);
--
-- 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);
-- pdev = to_pci_dev(dev);
-- pci_insertion_sort_klist(pdev, &sorted_devices);
-- }
-- list_splice(&sorted_devices, &device_klist->k_list);
-- spin_unlock(&device_klist->k_lock);
-+ bus_sort_breadthfirst(&pci_bus_type, &pci_sort_bf_cmp);
- }
---- a/include/linux/device.h
-+++ b/include/linux/device.h
-@@ -90,6 +90,9 @@ int __must_check bus_for_each_drv(struct
- struct device_driver *start, void *data,
- int (*fn)(struct device_driver *, void *));
-
-+void bus_sort_breadthfirst(struct bus_type *bus,
-+ int (*compare)(const struct device *a,
-+ const struct device *b));
- /*
- * Bus notifiers: Get notified of addition/removal of devices
- * and binding/unbinding of drivers to devices.
diff --git a/driver-core/driver-core-basic-infrastructure-for-per-module-dynamic-debug-messages.patch b/driver-core/driver-core-basic-infrastructure-for-per-module-dynamic-debug-messages.patch
deleted file mode 100644
index b415f79eda656f..00000000000000
--- a/driver-core/driver-core-basic-infrastructure-for-per-module-dynamic-debug-messages.patch
+++ /dev/null
@@ -1,946 +0,0 @@
-From jbaron@redhat.com Tue Aug 12 17:09:39 2008
-From: Jason Baron <jbaron@redhat.com>
-Date: Tue, 12 Aug 2008 16:46:19 -0400
-Subject: driver core: basic infrastructure for per-module dynamic debug messages
-To: Greg KH <greg@kroah.com>
-Cc: Randy Dunlap <randy.dunlap@oracle.com>, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, joe@perches.com, nick@nick-andrew.net
-Message-ID: <20080812204619.GE6056@redhat.com>
-Content-Disposition: inline
-
-Base infrastructure to enable per-module debug messages.
-
-I've introduced CONFIG_DYNAMIC_PRINTK_DEBUG, which when enabled centralizes
-control of debugging statements on a per-module basis in one /proc file,
-currently, <debugfs>/dynamic_printk/modules. When, CONFIG_DYNAMIC_PRINTK_DEBUG,
-is not set, debugging statements can still be enabled as before, often by
-defining 'DEBUG' for the proper compilation unit. Thus, this patch set has no
-affect when CONFIG_DYNAMIC_PRINTK_DEBUG is not set.
-
-The infrastructure currently ties into all pr_debug() and dev_dbg() calls. That
-is, if CONFIG_DYNAMIC_PRINTK_DEBUG is set, all pr_debug() and dev_dbg() calls
-can be dynamically enabled/disabled on a per-module basis.
-
-Future plans include extending this functionality to subsystems, that define
-their own debug levels and flags.
-
-Usage:
-
-Dynamic debugging is controlled by the debugfs file,
-<debugfs>/dynamic_printk/modules. This file contains a list of the modules that
-can be enabled. The format of the file is as follows:
-
- <module_name> <enabled=0/1>
- .
- .
- .
-
- <module_name> : Name of the module in which the debug call resides
- <enabled=0/1> : whether the messages are enabled or not
-
-For example:
-
- snd_hda_intel enabled=0
- fixup enabled=1
- driver enabled=0
-
-Enable a module:
-
- $echo "set enabled=1 <module_name>" > dynamic_printk/modules
-
-Disable a module:
-
- $echo "set enabled=0 <module_name>" > dynamic_printk/modules
-
-Enable all modules:
-
- $echo "set enabled=1 all" > dynamic_printk/modules
-
-Disable all modules:
-
- $echo "set enabled=0 all" > dynamic_printk/modules
-
-Finally, passing "dynamic_printk" at the command line enables
-debugging for all modules. This mode can be turned off via the above
-disable command.
-
-[gkh: minor cleanups and tweaks to make the build work quietly]
-
-Signed-off-by: Jason Baron <jbaron@redhat.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
-
----
- Documentation/kernel-parameters.txt | 5
- include/asm-generic/vmlinux.lds.h | 10
- include/linux/device.h | 6
- include/linux/dynamic_printk.h | 93 ++++++++
- include/linux/kernel.h | 7
- include/linux/module.h | 1
- kernel/module.c | 31 ++
- lib/Kconfig.debug | 55 ++++
- lib/Makefile | 2
- lib/dynamic_printk.c | 418 ++++++++++++++++++++++++++++++++++++
- net/netfilter/nf_conntrack_pptp.c | 2
- scripts/Makefile.lib | 11
- scripts/basic/Makefile | 2
- scripts/basic/hash.c | 64 +++++
- 14 files changed, 700 insertions(+), 7 deletions(-)
-
---- a/Documentation/kernel-parameters.txt
-+++ b/Documentation/kernel-parameters.txt
-@@ -1713,6 +1713,11 @@ and is between 256 and 4096 characters.
- autoconfiguration.
- Ranges are in pairs (memory base and size).
-
-+ dynamic_printk
-+ Enables pr_debug()/dev_dbg() calls if
-+ CONFIG_DYNAMIC_PRINTK_DEBUG has been enabled. These can also
-+ be switched on/off via <debugfs>/dynamic_printk/modules
-+
- print-fatal-signals=
- [KNL] debug: print fatal signals
- print-fatal-signals=1: print segfault info to
---- a/include/asm-generic/vmlinux.lds.h
-+++ b/include/asm-generic/vmlinux.lds.h
-@@ -268,7 +268,15 @@
- CPU_DISCARD(init.data) \
- CPU_DISCARD(init.rodata) \
- MEM_DISCARD(init.data) \
-- MEM_DISCARD(init.rodata)
-+ MEM_DISCARD(init.rodata) \
-+ /* implement dynamic printk debug */ \
-+ VMLINUX_SYMBOL(__start___verbose_strings) = .; \
-+ *(__verbose_strings) \
-+ VMLINUX_SYMBOL(__stop___verbose_strings) = .; \
-+ . = ALIGN(8); \
-+ VMLINUX_SYMBOL(__start___verbose) = .; \
-+ *(__verbose) \
-+ VMLINUX_SYMBOL(__stop___verbose) = .;
-
- #define INIT_TEXT \
- *(.init.text) \
---- a/include/linux/device.h
-+++ b/include/linux/device.h
-@@ -550,7 +550,11 @@ extern const char *dev_driver_string(con
- #define dev_info(dev, format, arg...) \
- dev_printk(KERN_INFO , dev , format , ## arg)
-
--#ifdef DEBUG
-+#if 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
---- /dev/null
-+++ b/include/linux/dynamic_printk.h
-@@ -0,0 +1,93 @@
-+#ifndef _DYNAMIC_PRINTK_H
-+#define _DYNAMIC_PRINTK_H
-+
-+#define DYNAMIC_DEBUG_HASH_BITS 6
-+#define DEBUG_HASH_TABLE_SIZE (1 << DYNAMIC_DEBUG_HASH_BITS)
-+
-+#define TYPE_BOOLEAN 1
-+
-+#define DYNAMIC_ENABLED_ALL 0
-+#define DYNAMIC_ENABLED_NONE 1
-+#define DYNAMIC_ENABLED_SOME 2
-+
-+extern int dynamic_enabled;
-+
-+/* dynamic_printk_enabled, and dynamic_printk_enabled2 are bitmasks in which
-+ * bit n is set to 1 if any modname hashes into the bucket n, 0 otherwise. They
-+ * use independent hash functions, to reduce the chance of false positives.
-+ */
-+extern long long dynamic_printk_enabled;
-+extern long long dynamic_printk_enabled2;
-+
-+struct mod_debug {
-+ char *modname;
-+ char *logical_modname;
-+ char *flag_names;
-+ int type;
-+ int hash;
-+ int hash2;
-+} __attribute__((aligned(8)));
-+
-+int register_dynamic_debug_module(char *mod_name, int type, char *share_name,
-+ char *flags, int hash, int hash2);
-+
-+#if defined(CONFIG_DYNAMIC_PRINTK_DEBUG)
-+extern int unregister_dynamic_debug_module(char *mod_name);
-+extern int __dynamic_dbg_enabled_helper(char *modname, int type,
-+ int value, int hash);
-+
-+#define __dynamic_dbg_enabled(module, type, value, level, hash) ({ \
-+ int __ret = 0; \
-+ if (unlikely((dynamic_printk_enabled & (1LL << DEBUG_HASH)) && \
-+ (dynamic_printk_enabled2 & (1LL << DEBUG_HASH2)))) \
-+ __ret = __dynamic_dbg_enabled_helper(module, type, \
-+ value, hash);\
-+ __ret; })
-+
-+#define dynamic_pr_debug(fmt, ...) do { \
-+ static char mod_name[] \
-+ __attribute__((section("__verbose_strings"))) \
-+ = KBUILD_MODNAME; \
-+ static struct mod_debug descriptor \
-+ __used \
-+ __attribute__((section("__verbose"), aligned(8))) = \
-+ { mod_name, mod_name, NULL, TYPE_BOOLEAN, DEBUG_HASH, DEBUG_HASH2 };\
-+ if (__dynamic_dbg_enabled(KBUILD_MODNAME, TYPE_BOOLEAN, \
-+ 0, 0, DEBUG_HASH)) \
-+ printk(KERN_DEBUG KBUILD_MODNAME ":" fmt, \
-+ ##__VA_ARGS__); \
-+ } while (0)
-+
-+#define dynamic_dev_dbg(dev, format, ...) do { \
-+ static char mod_name[] \
-+ __attribute__((section("__verbose_strings"))) \
-+ = KBUILD_MODNAME; \
-+ static struct mod_debug descriptor \
-+ __used \
-+ __attribute__((section("__verbose"), aligned(8))) = \
-+ { mod_name, mod_name, NULL, TYPE_BOOLEAN, DEBUG_HASH, DEBUG_HASH2 };\
-+ if (__dynamic_dbg_enabled(KBUILD_MODNAME, TYPE_BOOLEAN, \
-+ 0, 0, DEBUG_HASH)) \
-+ dev_printk(KERN_DEBUG, dev, \
-+ KBUILD_MODNAME ": " format, \
-+ ##__VA_ARGS__); \
-+ } while (0)
-+
-+#else
-+
-+static inline int unregister_dynamic_debug_module(const char *mod_name)
-+{
-+ return 0;
-+}
-+static inline int __dynamic_dbg_enabled_helper(char *modname, int type,
-+ int value, int hash)
-+{
-+ return 0;
-+}
-+
-+#define __dynamic_dbg_enabled(module, type, value, level, hash) ({ 0; })
-+#define dynamic_pr_debug(fmt, ...) do { } while (0)
-+#define dynamic_dev_dbg(dev, format, ...) do { } while (0)
-+#endif
-+
-+#endif
---- a/include/linux/kernel.h
-+++ b/include/linux/kernel.h
-@@ -16,6 +16,7 @@
- #include <linux/log2.h>
- #include <linux/typecheck.h>
- #include <linux/ratelimit.h>
-+#include <linux/dynamic_printk.h>
- #include <asm/byteorder.h>
- #include <asm/bug.h>
-
-@@ -303,8 +304,12 @@ static inline char *pack_hex_byte(char *
- #define pr_info(fmt, arg...) \
- printk(KERN_INFO fmt, ##arg)
-
--#ifdef DEBUG
- /* If you are writing a driver, please use dev_dbg instead */
-+#if defined(CONFIG_DYNAMIC_PRINTK_DEBUG)
-+#define pr_debug(fmt, ...) do { \
-+ dynamic_pr_debug(fmt, ##__VA_ARGS__); \
-+ } while (0)
-+#elif defined(DEBUG)
- #define pr_debug(fmt, arg...) \
- printk(KERN_DEBUG fmt, ##arg)
- #else
---- a/include/linux/module.h
-+++ b/include/linux/module.h
-@@ -345,7 +345,6 @@ struct module
- /* Reference counts */
- struct module_ref ref[NR_CPUS];
- #endif
--
- };
- #ifndef MODULE_ARCH_INIT
- #define MODULE_ARCH_INIT {}
---- a/kernel/module.c
-+++ b/kernel/module.c
-@@ -784,6 +784,7 @@ sys_delete_module(const char __user *nam
- mutex_lock(&module_mutex);
- /* Store the name of the last unloaded module for diagnostic purposes */
- strlcpy(last_unloaded_module, mod->name, sizeof(last_unloaded_module));
-+ unregister_dynamic_debug_module(mod->name);
- free_module(mod);
-
- out:
-@@ -1783,6 +1784,33 @@ static inline void add_kallsyms(struct m
- }
- #endif /* CONFIG_KALLSYMS */
-
-+#ifdef CONFIG_DYNAMIC_PRINTK_DEBUG
-+static void dynamic_printk_setup(Elf_Shdr *sechdrs, unsigned int verboseindex)
-+{
-+ struct mod_debug *debug_info;
-+ unsigned long pos, end;
-+ unsigned int num_verbose;
-+
-+ pos = sechdrs[verboseindex].sh_addr;
-+ num_verbose = sechdrs[verboseindex].sh_size /
-+ sizeof(struct mod_debug);
-+ end = pos + (num_verbose * sizeof(struct mod_debug));
-+
-+ for (; pos < end; pos += sizeof(struct mod_debug)) {
-+ debug_info = (struct mod_debug *)pos;
-+ register_dynamic_debug_module(debug_info->modname,
-+ debug_info->type, debug_info->logical_modname,
-+ debug_info->flag_names, debug_info->hash,
-+ debug_info->hash2);
-+ }
-+}
-+#else
-+static inline void dynamic_printk_setup(Elf_Shdr *sechdrs,
-+ unsigned int verboseindex)
-+{
-+}
-+#endif /* CONFIG_DYNAMIC_PRINTK_DEBUG */
-+
- static void *module_alloc_update_bounds(unsigned long size)
- {
- void *ret = module_alloc(size);
-@@ -1831,6 +1859,7 @@ static noinline struct module *load_modu
- #endif
- unsigned int markersindex;
- unsigned int markersstringsindex;
-+ unsigned int verboseindex;
- struct module *mod;
- long err = 0;
- void *percpu = NULL, *ptr = NULL; /* Stops spurious gcc warning */
-@@ -2117,6 +2146,7 @@ static noinline struct module *load_modu
- markersindex = find_sec(hdr, sechdrs, secstrings, "__markers");
- markersstringsindex = find_sec(hdr, sechdrs, secstrings,
- "__markers_strings");
-+ verboseindex = find_sec(hdr, sechdrs, secstrings, "__verbose");
-
- /* Now do relocations. */
- for (i = 1; i < hdr->e_shnum; i++) {
-@@ -2167,6 +2197,7 @@ static noinline struct module *load_modu
- marker_update_probe_range(mod->markers,
- mod->markers + mod->num_markers);
- #endif
-+ dynamic_printk_setup(sechdrs, verboseindex);
- err = module_finalize(hdr, sechdrs, mod);
- if (err < 0)
- goto cleanup;
---- /dev/null
-+++ b/lib/dynamic_printk.c
-@@ -0,0 +1,418 @@
-+/*
-+ * lib/dynamic_printk.c
-+ *
-+ * make pr_debug()/dev_dbg() calls runtime configurable based upon their
-+ * their source module.
-+ *
-+ * Copyright (C) 2008 Red Hat, Inc., Jason Baron <jbaron@redhat.com>
-+ */
-+
-+#include <linux/kernel.h>
-+#include <linux/module.h>
-+#include <linux/uaccess.h>
-+#include <linux/seq_file.h>
-+#include <linux/debugfs.h>
-+#include <linux/fs.h>
-+
-+extern struct mod_debug __start___verbose[];
-+extern struct mod_debug __stop___verbose[];
-+
-+struct debug_name {
-+ struct hlist_node hlist;
-+ struct hlist_node hlist2;
-+ int hash1;
-+ int hash2;
-+ char *name;
-+ int enable;
-+ int type;
-+};
-+
-+static int nr_entries;
-+static int num_enabled;
-+int dynamic_enabled = DYNAMIC_ENABLED_NONE;
-+static struct hlist_head module_table[DEBUG_HASH_TABLE_SIZE] =
-+ { [0 ... DEBUG_HASH_TABLE_SIZE-1] = HLIST_HEAD_INIT };
-+static struct hlist_head module_table2[DEBUG_HASH_TABLE_SIZE] =
-+ { [0 ... DEBUG_HASH_TABLE_SIZE-1] = HLIST_HEAD_INIT };
-+static DECLARE_MUTEX(debug_list_mutex);
-+
-+/* dynamic_printk_enabled, and dynamic_printk_enabled2 are bitmasks in which
-+ * bit n is set to 1 if any modname hashes into the bucket n, 0 otherwise. They
-+ * use independent hash functions, to reduce the chance of false positives.
-+ */
-+long long dynamic_printk_enabled;
-+EXPORT_SYMBOL_GPL(dynamic_printk_enabled);
-+long long dynamic_printk_enabled2;
-+EXPORT_SYMBOL_GPL(dynamic_printk_enabled2);
-+
-+/* returns the debug module pointer. */
-+static struct debug_name *find_debug_module(char *module_name)
-+{
-+ int i;
-+ struct hlist_head *head;
-+ struct hlist_node *node;
-+ struct debug_name *element;
-+
-+ element = NULL;
-+ for (i = 0; i < DEBUG_HASH_TABLE_SIZE; i++) {
-+ head = &module_table[i];
-+ hlist_for_each_entry_rcu(element, node, head, hlist)
-+ if (!strcmp(element->name, module_name))
-+ return element;
-+ }
-+ return NULL;
-+}
-+
-+/* returns the debug module pointer. */
-+static struct debug_name *find_debug_module_hash(char *module_name, int hash)
-+{
-+ struct hlist_head *head;
-+ struct hlist_node *node;
-+ struct debug_name *element;
-+
-+ element = NULL;
-+ head = &module_table[hash];
-+ hlist_for_each_entry_rcu(element, node, head, hlist)
-+ if (!strcmp(element->name, module_name))
-+ return element;
-+ return NULL;
-+}
-+
-+/* caller must hold mutex*/
-+static int __add_debug_module(char *mod_name, int hash, int hash2)
-+{
-+ struct debug_name *new;
-+ char *module_name;
-+ int ret = 0;
-+
-+ if (find_debug_module(mod_name)) {
-+ ret = -EINVAL;
-+ goto out;
-+ }
-+ module_name = kmalloc(strlen(mod_name) + 1, GFP_KERNEL);
-+ if (!module_name) {
-+ ret = -ENOMEM;
-+ goto out;
-+ }
-+ module_name = strcpy(module_name, mod_name);
-+ module_name[strlen(mod_name)] = '\0';
-+ new = kzalloc(sizeof(struct debug_name), GFP_KERNEL);
-+ if (!new) {
-+ kfree(module_name);
-+ ret = -ENOMEM;
-+ goto out;
-+ }
-+ INIT_HLIST_NODE(&new->hlist);
-+ INIT_HLIST_NODE(&new->hlist2);
-+ new->name = module_name;
-+ new->hash1 = hash;
-+ new->hash2 = hash2;
-+ hlist_add_head_rcu(&new->hlist, &module_table[hash]);
-+ hlist_add_head_rcu(&new->hlist2, &module_table2[hash2]);
-+ nr_entries++;
-+out:
-+ return ret;
-+}
-+
-+int unregister_dynamic_debug_module(char *mod_name)
-+{
-+ struct debug_name *element;
-+ int ret = 0;
-+
-+ down(&debug_list_mutex);
-+ element = find_debug_module(mod_name);
-+ if (!element) {
-+ ret = -EINVAL;
-+ goto out;
-+ }
-+ hlist_del_rcu(&element->hlist);
-+ hlist_del_rcu(&element->hlist2);
-+ synchronize_rcu();
-+ kfree(element->name);
-+ if (element->enable)
-+ num_enabled--;
-+ kfree(element);
-+ nr_entries--;
-+out:
-+ up(&debug_list_mutex);
-+ return 0;
-+}
-+EXPORT_SYMBOL_GPL(unregister_dynamic_debug_module);
-+
-+int register_dynamic_debug_module(char *mod_name, int type, char *share_name,
-+ char *flags, int hash, int hash2)
-+{
-+ struct debug_name *elem;
-+ int ret = 0;
-+
-+ down(&debug_list_mutex);
-+ elem = find_debug_module(mod_name);
-+ if (!elem) {
-+ if (__add_debug_module(mod_name, hash, hash2))
-+ goto out;
-+ elem = find_debug_module(mod_name);
-+ if (dynamic_enabled == DYNAMIC_ENABLED_ALL &&
-+ !strcmp(mod_name, share_name)) {
-+ elem->enable = true;
-+ num_enabled++;
-+ }
-+ }
-+ elem->type |= type;
-+out:
-+ up(&debug_list_mutex);
-+ return ret;
-+}
-+EXPORT_SYMBOL_GPL(register_dynamic_debug_module);
-+
-+int __dynamic_dbg_enabled_helper(char *mod_name, int type, int value, int hash)
-+{
-+ struct debug_name *elem;
-+ int ret = 0;
-+
-+ if (dynamic_enabled == DYNAMIC_ENABLED_ALL)
-+ return 1;
-+ rcu_read_lock();
-+ elem = find_debug_module_hash(mod_name, hash);
-+ if (elem && elem->enable)
-+ ret = 1;
-+ rcu_read_unlock();
-+ return ret;
-+}
-+EXPORT_SYMBOL_GPL(__dynamic_dbg_enabled_helper);
-+
-+static void set_all(bool enable)
-+{
-+ struct debug_name *e;
-+ struct hlist_node *node;
-+ int i;
-+ long long enable_mask;
-+
-+ for (i = 0; i < DEBUG_HASH_TABLE_SIZE; i++) {
-+ if (module_table[i].first != NULL) {
-+ hlist_for_each_entry(e, node, &module_table[i], hlist) {
-+ e->enable = enable;
-+ }
-+ }
-+ }
-+ if (enable)
-+ enable_mask = ULLONG_MAX;
-+ else
-+ enable_mask = 0;
-+ dynamic_printk_enabled = enable_mask;
-+ dynamic_printk_enabled2 = enable_mask;
-+}
-+
-+static int disabled_hash(int i, bool first_table)
-+{
-+ struct debug_name *e;
-+ struct hlist_node *node;
-+
-+ if (first_table) {
-+ hlist_for_each_entry(e, node, &module_table[i], hlist) {
-+ if (e->enable)
-+ return 0;
-+ }
-+ } else {
-+ hlist_for_each_entry(e, node, &module_table2[i], hlist2) {
-+ if (e->enable)
-+ return 0;
-+ }
-+ }
-+ return 1;
-+}
-+
-+static ssize_t pr_debug_write(struct file *file, const char __user *buf,
-+ size_t length, loff_t *ppos)
-+{
-+ char *buffer, *s, *value_str, *setting_str;
-+ int err, value;
-+ struct debug_name *elem = NULL;
-+ int all = 0;
-+
-+ if (length > PAGE_SIZE || length < 0)
-+ return -EINVAL;
-+
-+ buffer = (char *)__get_free_page(GFP_KERNEL);
-+ if (!buffer)
-+ return -ENOMEM;
-+
-+ err = -EFAULT;
-+ if (copy_from_user(buffer, buf, length))
-+ goto out;
-+
-+ err = -EINVAL;
-+ if (length < PAGE_SIZE)
-+ buffer[length] = '\0';
-+ else if (buffer[PAGE_SIZE-1])
-+ goto out;
-+
-+ err = -EINVAL;
-+ down(&debug_list_mutex);
-+
-+ if (strncmp("set", buffer, 3))
-+ goto out_up;
-+ s = buffer + 3;
-+ setting_str = strsep(&s, "=");
-+ if (s == NULL)
-+ goto out_up;
-+ setting_str = strstrip(setting_str);
-+ value_str = strsep(&s, " ");
-+ if (s == NULL)
-+ goto out_up;
-+ s = strstrip(s);
-+ if (!strncmp(s, "all", 3))
-+ all = 1;
-+ else
-+ elem = find_debug_module(s);
-+ if (!strncmp(setting_str, "enable", 6)) {
-+ value = !!simple_strtol(value_str, NULL, 10);
-+ if (all) {
-+ if (value) {
-+ set_all(true);
-+ num_enabled = nr_entries;
-+ dynamic_enabled = DYNAMIC_ENABLED_ALL;
-+ } else {
-+ set_all(false);
-+ num_enabled = 0;
-+ 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",
-+ 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 &=
-+ ~(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", elem->name);
-+ }
-+ }
-+ }
-+ }
-+ if (!err)
-+ err = length;
-+out_up:
-+ up(&debug_list_mutex);
-+out:
-+ free_page((unsigned long)buffer);
-+ return err;
-+}
-+
-+static void *pr_debug_seq_start(struct seq_file *f, loff_t *pos)
-+{
-+ return (*pos < DEBUG_HASH_TABLE_SIZE) ? pos : NULL;
-+}
-+
-+static void *pr_debug_seq_next(struct seq_file *s, void *v, loff_t *pos)
-+{
-+ (*pos)++;
-+ if (*pos >= DEBUG_HASH_TABLE_SIZE)
-+ return NULL;
-+ return pos;
-+}
-+
-+static void pr_debug_seq_stop(struct seq_file *s, void *v)
-+{
-+ /* Nothing to do */
-+}
-+
-+static int pr_debug_seq_show(struct seq_file *s, void *v)
-+{
-+ struct hlist_head *head;
-+ struct hlist_node *node;
-+ struct debug_name *elem;
-+ unsigned int i = *(loff_t *) v;
-+
-+ rcu_read_lock();
-+ head = &module_table[i];
-+ hlist_for_each_entry_rcu(elem, node, head, hlist) {
-+ seq_printf(s, "%s enabled=%d", elem->name, elem->enable);
-+ seq_printf(s, "\n");
-+ }
-+ rcu_read_unlock();
-+ return 0;
-+}
-+
-+static struct seq_operations pr_debug_seq_ops = {
-+ .start = pr_debug_seq_start,
-+ .next = pr_debug_seq_next,
-+ .stop = pr_debug_seq_stop,
-+ .show = pr_debug_seq_show
-+};
-+
-+static int pr_debug_open(struct inode *inode, struct file *filp)
-+{
-+ return seq_open(filp, &pr_debug_seq_ops);
-+}
-+
-+static const struct file_operations pr_debug_operations = {
-+ .open = pr_debug_open,
-+ .read = seq_read,
-+ .write = pr_debug_write,
-+ .llseek = seq_lseek,
-+ .release = seq_release,
-+};
-+
-+static int __init dynamic_printk_init(void)
-+{
-+ struct dentry *dir, *file;
-+ struct mod_debug *iter;
-+ unsigned long value;
-+
-+ dir = debugfs_create_dir("dynamic_printk", NULL);
-+ if (!dir)
-+ return -ENOMEM;
-+ file = debugfs_create_file("modules", 0644, dir, NULL,
-+ &pr_debug_operations);
-+ if (!file) {
-+ debugfs_remove(dir);
-+ return -ENOMEM;
-+ }
-+ for (value = (unsigned long)__start___verbose;
-+ value < (unsigned long)__stop___verbose;
-+ value += sizeof(struct mod_debug)) {
-+ iter = (struct mod_debug *)value;
-+ register_dynamic_debug_module(iter->modname,
-+ iter->type,
-+ iter->logical_modname,
-+ iter->flag_names, iter->hash, iter->hash2);
-+ }
-+ return 0;
-+}
-+module_init(dynamic_printk_init);
-+/* may want to move this earlier so we can get traces as early as possible */
-+
-+static int __init dynamic_printk_setup(char *str)
-+{
-+ if (str)
-+ return -ENOENT;
-+ set_all(true);
-+ return 0;
-+}
-+/* Use early_param(), so we can get debug output as early as possible */
-+early_param("dynamic_printk", dynamic_printk_setup);
---- a/lib/Kconfig.debug
-+++ b/lib/Kconfig.debug
-@@ -807,6 +807,61 @@ menuconfig BUILD_DOCSRC
-
- Say N if you are unsure.
-
-+config DYNAMIC_PRINTK_DEBUG
-+ bool "Enable dynamic printk() call support"
-+ default n
-+ depends on PRINTK
-+ select PRINTK_DEBUG
-+ help
-+
-+ Compiles debug level messages into the kernel, which would not
-+ otherwise be available at runtime. These messages can then be
-+ enabled/disabled on a per module basis. This mechanism implicitly
-+ enables all pr_debug() and dev_dbg() calls. The impact of this
-+ compile option is a larger kernel text size of about 2%.
-+
-+ Usage:
-+
-+ Dynamic debugging is controlled by the debugfs file,
-+ dynamic_printk/modules. This file contains a list of the modules that
-+ can be enabled. The format of the file is the module name, followed
-+ by a set of flags that can be enabled. The first flag is always the
-+ 'enabled' flag. For example:
-+
-+ <module_name> <enabled=0/1>
-+ .
-+ .
-+ .
-+
-+ <module_name> : Name of the module in which the debug call resides
-+ <enabled=0/1> : whether the messages are enabled or not
-+
-+ From a live system:
-+
-+ snd_hda_intel enabled=0
-+ fixup enabled=0
-+ driver enabled=0
-+
-+ Enable a module:
-+
-+ $echo "set enabled=1 <module_name>" > dynamic_printk/modules
-+
-+ Disable a module:
-+
-+ $echo "set enabled=0 <module_name>" > dynamic_printk/modules
-+
-+ Enable all modules:
-+
-+ $echo "set enabled=1 all" > dynamic_printk/modules
-+
-+ Disable all modules:
-+
-+ $echo "set enabled=0 all" > dynamic_printk/modules
-+
-+ Finally, passing "dynamic_printk" at the command line enables
-+ debugging for all modules. This mode can be turned off via the above
-+ disable command.
-+
- source "samples/Kconfig"
-
- source "lib/Kconfig.kgdb"
---- a/lib/Makefile
-+++ b/lib/Makefile
-@@ -81,6 +81,8 @@ obj-$(CONFIG_HAVE_LMB) += lmb.o
-
- obj-$(CONFIG_HAVE_ARCH_TRACEHOOK) += syscall.o
-
-+obj-$(CONFIG_DYNAMIC_PRINTK_DEBUG) += dynamic_printk.o
-+
- hostprogs-y := gen_crc32table
- clean-files := crc32table.h
-
---- a/net/netfilter/nf_conntrack_pptp.c
-+++ b/net/netfilter/nf_conntrack_pptp.c
-@@ -65,7 +65,7 @@ void
- struct nf_conntrack_expect *exp) __read_mostly;
- EXPORT_SYMBOL_GPL(nf_nat_pptp_hook_expectfn);
-
--#ifdef DEBUG
-+#if defined(DEBUG) || defined(CONFIG_DYNAMIC_PRINTK_DEBUG)
- /* PptpControlMessageType names */
- const char *const pptp_msg_name[] = {
- "UNKNOWN_MESSAGE",
---- /dev/null
-+++ b/scripts/basic/hash.c
-@@ -0,0 +1,64 @@
-+/*
-+ * Copyright (C) 2008 Red Hat, Inc., Jason Baron <jbaron@redhat.com>
-+ *
-+ */
-+
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <string.h>
-+
-+#define DYNAMIC_DEBUG_HASH_BITS 6
-+
-+static const char *program;
-+
-+static void usage(void)
-+{
-+ printf("Usage: %s <djb2|r5> <modname>\n", program);
-+ exit(1);
-+}
-+
-+/* djb2 hashing algorithm by Dan Bernstein. From:
-+ * http://www.cse.yorku.ca/~oz/hash.html
-+ */
-+
-+unsigned int djb2_hash(char *str)
-+{
-+ unsigned long hash = 5381;
-+ int c;
-+
-+ c = *str;
-+ while (c) {
-+ hash = ((hash << 5) + hash) + c;
-+ c = *++str;
-+ }
-+ return (unsigned int)(hash & ((1 << DYNAMIC_DEBUG_HASH_BITS) - 1));
-+}
-+
-+unsigned int r5_hash(char *str)
-+{
-+ unsigned long hash = 0;
-+ int c;
-+
-+ c = *str;
-+ while (c) {
-+ hash = (hash + (c << 4) + (c >> 4)) * 11;
-+ c = *++str;
-+ }
-+ return (unsigned int)(hash & ((1 << DYNAMIC_DEBUG_HASH_BITS) - 1));
-+}
-+
-+int main(int argc, char *argv[])
-+{
-+ program = argv[0];
-+
-+ if (argc != 3)
-+ usage();
-+ if (!strcmp(argv[1], "djb2"))
-+ printf("%d\n", djb2_hash(argv[2]));
-+ else if (!strcmp(argv[1], "r5"))
-+ printf("%d\n", r5_hash(argv[2]));
-+ else
-+ usage();
-+ exit(0);
-+}
-+
---- a/scripts/basic/Makefile
-+++ b/scripts/basic/Makefile
-@@ -9,7 +9,7 @@
- # fixdep: Used to generate dependency information during build process
- # docproc: Used in Documentation/DocBook
-
--hostprogs-y := fixdep docproc
-+hostprogs-y := fixdep docproc hash
- always := $(hostprogs-y)
-
- # fixdep is needed to compile other host programs
---- a/scripts/Makefile.lib
-+++ b/scripts/Makefile.lib
-@@ -96,6 +96,14 @@ basename_flags = -D"KBUILD_BASENAME=KBUI
- modname_flags = $(if $(filter 1,$(words $(modname))),\
- -D"KBUILD_MODNAME=KBUILD_STR($(call name-fix,$(modname)))")
-
-+#hash values
-+ifdef CONFIG_DYNAMIC_PRINTK_DEBUG
-+debug_flags = -D"DEBUG_HASH=$(shell ./scripts/basic/hash djb2 $(@D)$(modname))"\
-+ -D"DEBUG_HASH2=$(shell ./scripts/basic/hash r5 $(@D)$(modname))"
-+else
-+debug_flags =
-+endif
-+
- orig_c_flags = $(KBUILD_CFLAGS) $(ccflags-y) $(CFLAGS_$(basetarget).o)
- _c_flags = $(filter-out $(CFLAGS_REMOVE_$(basetarget).o), $(orig_c_flags))
- _a_flags = $(KBUILD_AFLAGS) $(asflags-y) $(AFLAGS_$(basetarget).o)
-@@ -121,7 +129,8 @@ endif
-
- c_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(KBUILD_CPPFLAGS) \
- $(__c_flags) $(modkern_cflags) \
-- -D"KBUILD_STR(s)=\#s" $(basename_flags) $(modname_flags)
-+ -D"KBUILD_STR(s)=\#s" $(basename_flags) $(modname_flags) \
-+ $(debug_flags)
-
- a_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(KBUILD_CPPFLAGS) \
- $(__a_flags) $(modkern_aflags)
diff --git a/driver-core/driver-core-clarify-device-cleanup.patch b/driver-core/driver-core-clarify-device-cleanup.patch
deleted file mode 100644
index 72727079a017ba..00000000000000
--- a/driver-core/driver-core-clarify-device-cleanup.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From cornelia.huck@de.ibm.com Thu Sep 11 02:38:07 2008
-From: Cornelia Huck <cornelia.huck@de.ibm.com>
-Date: Wed, 3 Sep 2008 18:26:40 +0200
-Subject: Driver core: Clarify device cleanup.
-To: Greg K-H <greg@kroah.com>
-Message-ID: <20080903182640.14279526@gondolin.boeblingen.de.ibm.com>
-
-From: Cornelia Huck <cornelia.huck@de.ibm.com>
-
-Make the comments on how to use device_initialize(), device_add()
-and device_register() a bit clearer - in particular, explicitly
-note that put_device() must be used once we tried to add the device
-to the hierarchy.
-
-Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
-Cc: stable <stable@kernel.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/base/core.c | 23 ++++++++++++++++++-----
- 1 file changed, 18 insertions(+), 5 deletions(-)
-
---- a/drivers/base/core.c
-+++ b/drivers/base/core.c
-@@ -523,11 +523,16 @@ static void klist_children_put(struct kl
- * device_initialize - init device structure.
- * @dev: device.
- *
-- * This prepares the device for use by other layers,
-- * including adding it to the device hierarchy.
-+ * This prepares the device for use by other layers by initializing
-+ * its fields.
- * It is the first half of device_register(), if called by
-- * that, though it can also be called separately, so one
-- * may use @dev's fields (e.g. the refcount).
-+ * that function, though it can also be called separately, so one
-+ * may use @dev's fields. In particular, get_device()/put_device()
-+ * may be used for reference counting of @dev after calling this
-+ * function.
-+ *
-+ * NOTE: Use put_device() to give up your reference instead of freeing
-+ * @dev directly once you have called this function.
- */
- void device_initialize(struct device *dev)
- {
-@@ -835,9 +840,13 @@ static void device_remove_sys_dev_entry(
- * This is part 2 of device_register(), though may be called
- * separately _iff_ device_initialize() has been called separately.
- *
-- * This adds it to the kobject hierarchy via kobject_add(), adds it
-+ * This adds @dev to the kobject hierarchy via kobject_add(), adds it
- * to the global and sibling lists for the device, then
- * adds it to the other relevant subsystems of the driver model.
-+ *
-+ * NOTE: _Never_ directly free @dev after calling this function, even
-+ * if it returned an error! Always use put_device() to give up your
-+ * reference instead.
- */
- int device_add(struct device *dev)
- {
-@@ -965,6 +974,10 @@ done:
- * I.e. you should only call the two helpers separately if
- * have a clearly defined need to use and refcount the device
- * before it is added to the hierarchy.
-+ *
-+ * NOTE: _Never_ directly free @dev after calling this function, even
-+ * if it returned an error! Always use put_device() to give up the
-+ * reference initialized in this function instead.
- */
- int device_register(struct device *dev)
- {
diff --git a/driver-core/driver-core-fix-cleanup-in-device_create_vargs.patch b/driver-core/driver-core-fix-cleanup-in-device_create_vargs.patch
deleted file mode 100644
index b48f34cf9ed454..00000000000000
--- a/driver-core/driver-core-fix-cleanup-in-device_create_vargs.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From cornelia.huck@de.ibm.com Thu Sep 11 02:38:46 2008
-From: Cornelia Huck <cornelia.huck@de.ibm.com>
-Date: Wed, 3 Sep 2008 18:26:41 +0200
-Subject: Driver core: Fix cleanup in device_create_vargs().
-To: Greg K-H <greg@kroah.com>
-Cc: linux-kernel <linux-kernel@vger.kernel.org>
-Message-ID: <20080903182641.75db23a6@gondolin.boeblingen.de.ibm.com>
-
-From: Cornelia Huck <cornelia.huck@de.ibm.com>
-
-If device_register() in device_create_vargs() fails, the device
-must be cleaned up with put_device() (which is also fine on NULL)
-instead of kfree().
-
-Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
-Cc: stable <stable@kernel.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/base/core.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/base/core.c
-+++ b/drivers/base/core.c
-@@ -1256,7 +1256,7 @@ struct device *device_create_vargs(struc
- return dev;
-
- error:
-- kfree(dev);
-+ put_device(dev);
- return ERR_PTR(retval);
- }
- EXPORT_SYMBOL_GPL(device_create_vargs);
diff --git a/driver-core/driver-core-make-bus_find_device_by_name-more-robust.patch b/driver-core/driver-core-make-bus_find_device_by_name-more-robust.patch
deleted file mode 100644
index 94dd7ae7030a3f..00000000000000
--- a/driver-core/driver-core-make-bus_find_device_by_name-more-robust.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From jacmet@sunsite.dk Tue Sep 23 15:58:17 2008
-From: Peter Korsgaard <jacmet@sunsite.dk>
-Date: Tue, 23 Sep 2008 22:01:27 +0200
-Subject: Driver core: make bus_find_device_by_name() more robust
-To: gregkh@suse.de, dbrownell@users.sourceforge.net, linux-kernel@vger.kernel.org
-Cc: Peter Korsgaard <jacmet@sunsite.dk>
-Message-ID: <1222200087-11533-1-git-send-email-jacmet@sunsite.dk>
-
-From: Peter Korsgaard <jacmet@sunsite.dk>
-
-Use sysfs_streq() in bus_find_device_by_name() so trailing newlines
-are ignored (E.G. in bind/unbind).
-
-Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/base/bus.c | 4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
-
---- a/drivers/base/bus.c
-+++ b/drivers/base/bus.c
-@@ -333,9 +333,7 @@ static int match_name(struct device *dev
- {
- const char *name = data;
-
-- if (strcmp(name, dev->bus_id) == 0)
-- return 1;
-- return 0;
-+ return sysfs_streq(name, dev->bus_id);
- }
-
- /**
diff --git a/driver-core/driver-core-make-struct-platform_pm_ops-static.patch b/driver-core/driver-core-make-struct-platform_pm_ops-static.patch
deleted file mode 100644
index 59e6cfb413b2cb..00000000000000
--- a/driver-core/driver-core-make-struct-platform_pm_ops-static.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From bunk@kernel.org Thu Jul 31 09:57:04 2008
-From: Adrian Bunk <bunk@kernel.org>
-Date: Mon, 21 Jul 2008 22:33:36 +0300
-Subject: driver core: make struct platform_pm_ops static
-To: "Rafael J. Wysocki" <rjw@sisk.pl>, Pavel Machek <pavel@ucw.cz>, Greg KH <greg@kroah.com>, Jesse Barnes <jbarnes@virtuousgeek.org>
-Cc: linux-kernel@vger.kernel.org
-Message-ID: <20080721193336.GB14846@cs181140183.pp.htv.fi>
-Content-Disposition: inline
-
-
-This patch makes the needlessly global struct platform_pm_ops static.
-
-Signed-off-by: Adrian Bunk <bunk@kernel.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/base/platform.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/base/platform.c
-+++ b/drivers/base/platform.c
-@@ -862,7 +862,7 @@ static int platform_pm_restore_noirq(str
-
- #endif /* !CONFIG_HIBERNATION */
-
--struct pm_ext_ops platform_pm_ops = {
-+static struct pm_ext_ops platform_pm_ops = {
- .base = {
- .prepare = platform_pm_prepare,
- .complete = platform_pm_complete,
diff --git a/driver-core/drivers-firmware-iscsi_ibft.c-make-3-functions-static.patch b/driver-core/drivers-firmware-iscsi_ibft.c-make-3-functions-static.patch
deleted file mode 100644
index ca046572e0c131..00000000000000
--- a/driver-core/drivers-firmware-iscsi_ibft.c-make-3-functions-static.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From ketuzsezr@darnok.org Wed Aug 20 13:31:17 2008
-From: Konrad Rzeszutek <ketuzsezr@darnok.org>
-Date: Tue, 12 Aug 2008 15:43:59 -0400
-Subject: drivers/firmware/iscsi_ibft.c: make 3 functions static
-To: gregkh@suse.de
-Cc: <pjones@redhat.com>, Adrian Bunk <bunk@kernel.org>, Konrad Rzeszutek <ketuzsezr@darnok.org>
-Message-ID: <1218570239-17766-2-git-send-email-ketuzsezr@darnok.org>
-
-
-From: Adrian Bunk <bunk@kernel.org>
-
-This patch makes the following needlessly global functions static:
-- ibft_attr_show_initiator()
-- ibft_attr_show_nic()
-- ibft_attr_show_target()
-
-Signed-off-by: Adrian Bunk <bunk@kernel.org>
-Signed-off-by: Konrad Rzeszutek <ketuzsezr@darnok.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/firmware/iscsi_ibft.c | 18 +++++++++---------
- 1 file changed, 9 insertions(+), 9 deletions(-)
-
---- a/drivers/firmware/iscsi_ibft.c
-+++ b/drivers/firmware/iscsi_ibft.c
-@@ -334,9 +334,9 @@ static void ibft_release(struct kobject
- /*
- * Routines for parsing the iBFT data to be human readable.
- */
--ssize_t ibft_attr_show_initiator(struct ibft_kobject *entry,
-- struct ibft_attribute *attr,
-- char *buf)
-+static ssize_t ibft_attr_show_initiator(struct ibft_kobject *entry,
-+ struct ibft_attribute *attr,
-+ char *buf)
- {
- struct ibft_initiator *initiator = entry->initiator;
- void *ibft_loc = entry->header;
-@@ -376,9 +376,9 @@ ssize_t ibft_attr_show_initiator(struct
- return str - buf;
- }
-
--ssize_t ibft_attr_show_nic(struct ibft_kobject *entry,
-- struct ibft_attribute *attr,
-- char *buf)
-+static ssize_t ibft_attr_show_nic(struct ibft_kobject *entry,
-+ struct ibft_attribute *attr,
-+ char *buf)
- {
- struct ibft_nic *nic = entry->nic;
- void *ibft_loc = entry->header;
-@@ -440,9 +440,9 @@ ssize_t ibft_attr_show_nic(struct ibft_k
- return str - buf;
- };
-
--ssize_t ibft_attr_show_target(struct ibft_kobject *entry,
-- struct ibft_attribute *attr,
-- char *buf)
-+static ssize_t ibft_attr_show_target(struct ibft_kobject *entry,
-+ struct ibft_attribute *attr,
-+ char *buf)
- {
- struct ibft_tgt *tgt = entry->tgt;
- void *ibft_loc = entry->header;
diff --git a/driver-core/kobject-cleanup-kobject_rename-and-config_sysfs.patch b/driver-core/kobject-cleanup-kobject_rename-and-config_sysfs.patch
deleted file mode 100644
index 18f749d8f0647f..00000000000000
--- a/driver-core/kobject-cleanup-kobject_rename-and-config_sysfs.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-From ebiederm@xmission.com Thu Jul 3 18:11:54 2008
-From: Eric W. Biederman <ebiederm@xmission.com>
-Date: Thu, 03 Jul 2008 18:05:28 -0700
-Subject: kobject: Cleanup kobject_rename and !CONFIG_SYSFS
-To: ebiederm@xmission.com (Eric W. Biederman)
-Cc: Greg Kroah-Hartman <gregkh@suse.de>, Andrew Morton <akpm@linux-foundation.org>, Tejun Heo <htejun@gmail.com>, Daniel Lezcano <dlezcano@fr.ibm.com>, linux-kernel@vger.kernel.org, Al Viro <viro@ftp.linux.org.uk>, Linux Containers <containers@lists.osdl.org>, Benjamin Thery <benjamin.thery@bull.net>, <netdev@vger.kernel.org>
-Message-ID: <m1tzf6ihlz.fsf_-_@frodo.ebiederm.org>
-
-From: Eric W. Biederman <ebiederm@xmission.com>
-
-It finally dawned on me what the clean fix to sysfs_rename_dir
-calling kobject_set_name is. Move the work into kobject_rename
-where it belongs. The callers serialize us anyway so this is
-safe.
-
-Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
-Acked-by: Tejun Heo <tj@kernel.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- fs/sysfs/dir.c | 6 +-----
- include/linux/sysfs.h | 4 +---
- lib/kobject.c | 17 +++++++++++++++--
- 3 files changed, 17 insertions(+), 10 deletions(-)
-
---- a/fs/sysfs/dir.c
-+++ b/fs/sysfs/dir.c
-@@ -829,16 +829,12 @@ int sysfs_rename_dir(struct kobject * ko
- if (!new_dentry)
- goto out_unlock;
-
-- /* rename kobject and sysfs_dirent */
-+ /* rename sysfs_dirent */
- error = -ENOMEM;
- new_name = dup_name = kstrdup(new_name, GFP_KERNEL);
- if (!new_name)
- goto out_unlock;
-
-- error = kobject_set_name(kobj, "%s", new_name);
-- if (error)
-- goto out_unlock;
--
- dup_name = sd->s_name;
- sd->s_name = new_name;
-
---- a/include/linux/sysfs.h
-+++ b/include/linux/sysfs.h
-@@ -20,8 +20,6 @@
- struct kobject;
- struct module;
-
--extern int kobject_set_name(struct kobject *kobj, const char *name, ...)
-- __attribute__((format(printf, 2, 3)));
- /* FIXME
- * The *owner field is no longer used, but leave around
- * until the tree gets cleaned up fully.
-@@ -149,7 +147,7 @@ static inline void sysfs_remove_dir(stru
-
- static inline int sysfs_rename_dir(struct kobject *kobj, const char *new_name)
- {
-- return kobject_set_name(kobj, "%s", new_name);
-+ return 0;
- }
-
- static inline int sysfs_move_dir(struct kobject *kobj,
---- a/lib/kobject.c
-+++ b/lib/kobject.c
-@@ -397,6 +397,7 @@ int kobject_rename(struct kobject *kobj,
- {
- int error = 0;
- const char *devpath = NULL;
-+ const char *dup_name = NULL, *name;
- char *devpath_string = NULL;
- char *envp[2];
-
-@@ -420,15 +421,27 @@ int kobject_rename(struct kobject *kobj,
- envp[0] = devpath_string;
- envp[1] = NULL;
-
-+ name = dup_name = kstrdup(new_name, GFP_KERNEL);
-+ if (!name) {
-+ error = -ENOMEM;
-+ goto out;
-+ }
-+
- error = sysfs_rename_dir(kobj, new_name);
-+ if (error)
-+ goto out;
-+
-+ /* Install the new kobject name */
-+ dup_name = kobj->name;
-+ kobj->name = name;
-
- /* This function is mostly/only used for network interface.
- * Some hotplug package track interfaces by their name and
- * therefore want to know when the name is changed by the user. */
-- if (!error)
-- kobject_uevent_env(kobj, KOBJ_MOVE, envp);
-+ kobject_uevent_env(kobj, KOBJ_MOVE, envp);
-
- out:
-+ kfree(dup_name);
- kfree(devpath_string);
- kfree(devpath);
- kobject_put(kobj);
diff --git a/driver-core/kobject-fix-kobject_rename-and-config_sysfs.patch b/driver-core/kobject-fix-kobject_rename-and-config_sysfs.patch
deleted file mode 100644
index 63b3b5f7c9d213..00000000000000
--- a/driver-core/kobject-fix-kobject_rename-and-config_sysfs.patch
+++ /dev/null
@@ -1,125 +0,0 @@
-From ebiederm@xmission.com Thu May 8 14:50:04 2008
-From: Eric W. Biederman <ebiederm@xmission.com>
-Date: Thu, 08 May 2008 14:41:00 -0700
-Subject: kobject: Fix kobject_rename and !CONFIG_SYSFS
-To: Greg KH <gregkh@suse.de>, Andrew Morton <akpm@linux-foundation.org>
-Cc: Benjamin Thery <benjamin.thery@bull.net>, linux-kernel@vger.kernel.org, Tejun Heo <htejun@gmail.com>, Al Viro <viro@ftp.linux.org.uk>, Daniel Lezcano <dlezcano@fr.ibm.com>, "Serge E. Hallyn" <serue@us.ibm.com>, Pavel Emelyanov <xemul@openvz.org>, netdev@vger.kernel.org
-Message-ID: <m163tocw43.fsf_-_@frodo.ebiederm.org>
-
-From: Eric W. Biederman <ebiederm@xmission.com>
-
-When looking at kobject_rename I found two bugs with
-that exist when sysfs support is disabled in the kernel.
-
-kobject_rename does not change the name on the kobject when
-sysfs support is not compiled in.
-
-kobject_rename without locking attempts to check the
-validity of a rename operation, which the kobject layer
-simply does not have the infrastructure to do.
-
-This patch documents the previously unstated requirement of
-kobject_rename that is the responsibility of the caller to
-provide mutual exclusion and to be certain that the new_name
-for the kobject is valid.
-
-This patch modifies sysfs_rename_dir in !CONFIG_SYSFS case
-to call kobject_set_name to actually change the kobject_name.
-
-This patch removes the bogus and misleading check in kobject_rename
-that attempts to see if a rename is valid. The check is bogus
-because we do not have the proper locking. The check is misleading
-because it looks like we can and do perform checking at the kobject
-level that we don't.
-
-Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- Documentation/kobject.txt | 4 ++++
- drivers/base/core.c | 5 +++++
- include/linux/sysfs.h | 4 +++-
- lib/kobject.c | 18 +++++-------------
- 4 files changed, 17 insertions(+), 14 deletions(-)
-
---- a/Documentation/kobject.txt
-+++ b/Documentation/kobject.txt
-@@ -118,6 +118,10 @@ 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
-+and serialization.
-+
- There is a function called kobject_set_name() but that is legacy cruft and
- is being removed. If your code needs to call this function, it is
- incorrect and needs to be fixed.
---- a/drivers/base/core.c
-+++ b/drivers/base/core.c
-@@ -1327,6 +1327,11 @@ EXPORT_SYMBOL_GPL(device_destroy);
- * device_rename - renames a device
- * @dev: the pointer to the struct device to be renamed
- * @new_name: the new name of the device
-+ *
-+ * It is the responsibility of the caller to provide mutual
-+ * exclusion between two different calls of device_rename
-+ * on the same device to ensure that new_name is valid and
-+ * won't conflict with other devices.
- */
- int device_rename(struct device *dev, char *new_name)
- {
---- a/include/linux/sysfs.h
-+++ b/include/linux/sysfs.h
-@@ -20,6 +20,8 @@
- struct kobject;
- struct module;
-
-+extern int kobject_set_name(struct kobject *kobj, const char *name, ...)
-+ __attribute__((format(printf, 2, 3)));
- /* FIXME
- * The *owner field is no longer used, but leave around
- * until the tree gets cleaned up fully.
-@@ -147,7 +149,7 @@ static inline void sysfs_remove_dir(stru
-
- static inline int sysfs_rename_dir(struct kobject *kobj, const char *new_name)
- {
-- return 0;
-+ return kobject_set_name(kobj, "%s", new_name);
- }
-
- static inline int sysfs_move_dir(struct kobject *kobj,
---- a/lib/kobject.c
-+++ b/lib/kobject.c
-@@ -387,6 +387,11 @@ EXPORT_SYMBOL_GPL(kobject_init_and_add);
- * kobject_rename - change the name of an object
- * @kobj: object in question.
- * @new_name: object's new name
-+ *
-+ * It is the responsibility of the caller to provide mutual
-+ * exclusion between two different calls of kobject_rename
-+ * on the same kobject and to ensure that new_name is valid and
-+ * won't conflict with other kobjects.
- */
- int kobject_rename(struct kobject *kobj, const char *new_name)
- {
-@@ -401,19 +406,6 @@ int kobject_rename(struct kobject *kobj,
- if (!kobj->parent)
- return -EINVAL;
-
-- /* see if this name is already in use */
-- if (kobj->kset) {
-- struct kobject *temp_kobj;
-- temp_kobj = kset_find_obj(kobj->kset, new_name);
-- if (temp_kobj) {
-- printk(KERN_WARNING "kobject '%s' cannot be renamed "
-- "to '%s' as '%s' is already in existence.\n",
-- kobject_name(kobj), new_name, new_name);
-- kobject_put(temp_kobj);
-- return -EINVAL;
-- }
-- }
--
- devpath = kobject_get_path(kobj, GFP_KERNEL);
- if (!devpath) {
- error = -ENOMEM;
diff --git a/driver-core/net-convert-the-phy_device-file-to-use-bus_find_device_by_name.patch b/driver-core/net-convert-the-phy_device-file-to-use-bus_find_device_by_name.patch
deleted file mode 100644
index ff40ae0c295e19..00000000000000
--- a/driver-core/net-convert-the-phy_device-file-to-use-bus_find_device_by_name.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From foo@baz Tue Apr 9 12:12:43 2002
-Date: Sun, 27 Jan 2008 10:29:20 -0800 (PST)
-To: Greg KH <greg@kroah.com>
-From: Greg Kroah-Hartman <gregkh@suse.de>
-Subject: NET: convert the phy_device file to use bus_find_device_by_name
-
-The driver core now has this helper function, so might as well use it
-instead of forcing the phy code to roll their own version.
-
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
-
-The bus_find_device_by_name function is in my driver tree and will be
-going to Linus in a day or so to fix up some other build issues. Feel
-free to add this to the network driver tree and send it whenever you
-wish.
-
-drivers/net/phy/phy_device.c | 8 +-------
- drivers/net/phy/phy_device.c | 8 +-------
- 1 file changed, 1 insertion(+), 7 deletions(-)
-
---- a/drivers/net/phy/phy_device.c
-+++ b/drivers/net/phy/phy_device.c
-@@ -309,11 +309,6 @@ void phy_disconnect(struct phy_device *p
- }
- EXPORT_SYMBOL(phy_disconnect);
-
--static int phy_compare_id(struct device *dev, void *data)
--{
-- return strcmp((char *)data, dev->bus_id) ? 0 : 1;
--}
--
- /**
- * phy_attach - attach a network device to a particular PHY device
- * @dev: network device to attach
-@@ -337,8 +332,7 @@ struct phy_device *phy_attach(struct net
-
- /* Search the list of PHY devices on the mdio bus for the
- * PHY with the requested name */
-- d = bus_find_device(bus, NULL, (void *)bus_id, phy_compare_id);
--
-+ d = bus_find_device_by_name(bus, NULL, bus_id);
- if (d) {
- phydev = to_phy_device(d);
- } else {
diff --git a/driver-core/platform-add-new-device-registration-helper.patch b/driver-core/platform-add-new-device-registration-helper.patch
deleted file mode 100644
index 47bc68a681d8e5..00000000000000
--- a/driver-core/platform-add-new-device-registration-helper.patch
+++ /dev/null
@@ -1,94 +0,0 @@
-From akpm@linux-foundation.org Wed Oct 1 14:02:56 2008
-From: Dmitry Baryshkov <dbaryshkov@gmail.com>
-Date: Mon, 22 Sep 2008 14:41:40 -0700
-Subject: platform: add new device registration helper
-To: greg@kroah.com
-Cc: akpm@linux-foundation.org, dbaryshkov@gmail.com
-Message-ID: <200809222141.m8MLffEu031281@imap1.linux-foundation.org>
-
-
-From: Dmitry Baryshkov <dbaryshkov@gmail.com>
-
-Add a helper that registers simple platform_device w/o resources but with
-parent and device data.
-
-This is usefull to cleanup platform code from code that registers such
-simple devices as leds-gpio, generic-bl, etc.
-
-Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
-Cc: David Brownell <dbrownell@users.sourceforge.net>
-Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/base/platform.c | 47 ++++++++++++++++++++++++++++++++++++++++
- include/linux/platform_device.h | 2 +
- 2 files changed, 49 insertions(+)
-
---- a/drivers/base/platform.c
-+++ b/drivers/base/platform.c
-@@ -391,6 +391,53 @@ error:
- }
- EXPORT_SYMBOL_GPL(platform_device_register_simple);
-
-+/**
-+ * platform_device_register_data
-+ * @parent: parent device for the device we're adding
-+ * @name: base name of the device we're adding
-+ * @id: instance id
-+ * @data: platform specific data for this platform device
-+ * @size: size of platform specific data
-+ *
-+ * This function creates a simple platform device that requires minimal
-+ * resource and memory management. Canned release function freeing memory
-+ * allocated for the device allows drivers using such devices to be
-+ * unloaded without waiting for the last reference to the device to be
-+ * dropped.
-+ */
-+struct platform_device *platform_device_register_data(
-+ struct device *parent,
-+ const char *name, int id,
-+ const void *data, size_t size)
-+{
-+ struct platform_device *pdev;
-+ int retval;
-+
-+ pdev = platform_device_alloc(name, id);
-+ if (!pdev) {
-+ retval = -ENOMEM;
-+ goto error;
-+ }
-+
-+ pdev->dev.parent = parent;
-+
-+ if (size) {
-+ retval = platform_device_add_data(pdev, data, size);
-+ if (retval)
-+ goto error;
-+ }
-+
-+ retval = platform_device_add(pdev);
-+ if (retval)
-+ goto error;
-+
-+ return pdev;
-+
-+error:
-+ platform_device_put(pdev);
-+ return ERR_PTR(retval);
-+}
-+
- static int platform_drv_probe(struct device *_dev)
- {
- struct platform_driver *drv = to_platform_driver(_dev->driver);
---- a/include/linux/platform_device.h
-+++ b/include/linux/platform_device.h
-@@ -37,6 +37,8 @@ extern int platform_add_devices(struct p
-
- extern struct platform_device *platform_device_register_simple(const char *, int id,
- struct resource *, unsigned int);
-+extern struct platform_device *platform_device_register_data(struct device *,
-+ const char *, int, const void *, size_t);
-
- extern struct platform_device *platform_device_alloc(const char *name, int id);
- extern int platform_device_add_resources(struct platform_device *pdev, struct resource *res, unsigned int num);
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
index cea95a91d8beb3..33531b09d520ff 100644
--- 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
@@ -41,7 +41,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
-@@ -500,8 +500,6 @@ int platform_driver_register(struct plat
+@@ -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;
@@ -50,7 +50,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return driver_register(&drv->driver);
}
EXPORT_SYMBOL_GPL(platform_driver_register);
-@@ -683,7 +681,10 @@ static int platform_pm_suspend(struct de
+@@ -686,7 +684,10 @@ static int platform_pm_suspend(struct de
struct device_driver *drv = dev->driver;
int ret = 0;
@@ -62,7 +62,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (drv->pm->suspend)
ret = drv->pm->suspend(dev);
} else {
-@@ -695,16 +696,15 @@ static int platform_pm_suspend(struct de
+@@ -698,16 +699,15 @@ static int platform_pm_suspend(struct de
static int platform_pm_suspend_noirq(struct device *dev)
{
@@ -84,7 +84,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
} else {
ret = platform_legacy_suspend_late(dev, PMSG_SUSPEND);
}
-@@ -717,7 +717,10 @@ static int platform_pm_resume(struct dev
+@@ -720,7 +720,10 @@ static int platform_pm_resume(struct dev
struct device_driver *drv = dev->driver;
int ret = 0;
@@ -96,7 +96,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (drv->pm->resume)
ret = drv->pm->resume(dev);
} else {
-@@ -729,16 +732,15 @@ static int platform_pm_resume(struct dev
+@@ -732,16 +735,15 @@ static int platform_pm_resume(struct dev
static int platform_pm_resume_noirq(struct device *dev)
{
@@ -118,7 +118,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
} else {
ret = platform_legacy_resume_early(dev);
}
-@@ -777,16 +779,15 @@ static int platform_pm_freeze(struct dev
+@@ -780,16 +782,15 @@ static int platform_pm_freeze(struct dev
static int platform_pm_freeze_noirq(struct device *dev)
{
@@ -140,7 +140,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
} else {
ret = platform_legacy_suspend_late(dev, PMSG_FREEZE);
}
-@@ -799,7 +800,10 @@ static int platform_pm_thaw(struct devic
+@@ -802,7 +803,10 @@ static int platform_pm_thaw(struct devic
struct device_driver *drv = dev->driver;
int ret = 0;
@@ -152,7 +152,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (drv->pm->thaw)
ret = drv->pm->thaw(dev);
} else {
-@@ -811,16 +815,15 @@ static int platform_pm_thaw(struct devic
+@@ -814,16 +818,15 @@ static int platform_pm_thaw(struct devic
static int platform_pm_thaw_noirq(struct device *dev)
{
@@ -174,7 +174,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
} else {
ret = platform_legacy_resume_early(dev);
}
-@@ -833,7 +836,10 @@ static int platform_pm_poweroff(struct d
+@@ -836,7 +839,10 @@ static int platform_pm_poweroff(struct d
struct device_driver *drv = dev->driver;
int ret = 0;
@@ -186,7 +186,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (drv->pm->poweroff)
ret = drv->pm->poweroff(dev);
} else {
-@@ -845,16 +851,15 @@ static int platform_pm_poweroff(struct d
+@@ -848,16 +854,15 @@ static int platform_pm_poweroff(struct d
static int platform_pm_poweroff_noirq(struct device *dev)
{
@@ -208,7 +208,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
} else {
ret = platform_legacy_suspend_late(dev, PMSG_HIBERNATE);
}
-@@ -867,7 +872,10 @@ static int platform_pm_restore(struct de
+@@ -870,7 +875,10 @@ static int platform_pm_restore(struct de
struct device_driver *drv = dev->driver;
int ret = 0;
@@ -220,7 +220,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (drv->pm->restore)
ret = drv->pm->restore(dev);
} else {
-@@ -879,16 +887,15 @@ static int platform_pm_restore(struct de
+@@ -882,16 +890,15 @@ static int platform_pm_restore(struct de
static int platform_pm_restore_noirq(struct device *dev)
{
@@ -242,7 +242,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
} else {
ret = platform_legacy_resume_early(dev);
}
-@@ -909,17 +916,15 @@ static int platform_pm_restore_noirq(str
+@@ -912,17 +919,15 @@ static int platform_pm_restore_noirq(str
#endif /* !CONFIG_HIBERNATION */
@@ -269,7 +269,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
.suspend_noirq = platform_pm_suspend_noirq,
.resume_noirq = platform_pm_resume_noirq,
.freeze_noirq = platform_pm_freeze_noirq,
-@@ -928,7 +933,7 @@ static struct pm_ext_ops platform_pm_ops
+@@ -931,7 +936,7 @@ static struct pm_ext_ops platform_pm_ops
.restore_noirq = platform_pm_restore_noirq,
};
diff --git a/driver-core/pnp-create-device-attributes-via-default-device-attributes.patch b/driver-core/pnp-create-device-attributes-via-default-device-attributes.patch
deleted file mode 100644
index b0a58f585f8c3e..00000000000000
--- a/driver-core/pnp-create-device-attributes-via-default-device-attributes.patch
+++ /dev/null
@@ -1,133 +0,0 @@
-From kay.sievers@vrfy.org Wed Oct 1 13:33:34 2008
-From: Drew Moseley <dmoseley@mvista.com>
-Date: Sun, 28 Sep 2008 01:31:35 +0200
-Subject: PNP: create device attributes via default device attributes
-To: Drew Moseley <dmoseley@mvista.com>
-Cc: <ambx1@neo.rr.com>, linux-kernel@vger.kernel.org, Greg KH <greg@kroah.com>
-Message-ID: <1222558295.2696.4.camel@lgn.site>
-
-From: Drew Moseley <dmoseley@mvista.com>
-
-This creates the attributes before the uevent is sent.
-
-Signed-off-by: Drew Moseley <dmoseley@mvista.com>
-Acked-by: Kay Sievers <kay.sievers@vrfy.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/pnp/base.h | 2 +-
- drivers/pnp/core.c | 10 +---------
- drivers/pnp/driver.c | 1 +
- drivers/pnp/interface.c | 37 ++++++++-----------------------------
- 4 files changed, 11 insertions(+), 39 deletions(-)
-
---- a/drivers/pnp/base.h
-+++ b/drivers/pnp/base.h
-@@ -4,6 +4,7 @@
- */
-
- extern spinlock_t pnp_lock;
-+extern struct device_attribute pnp_interface_attrs[];
- void *pnp_alloc(long size);
-
- int pnp_register_protocol(struct pnp_protocol *protocol);
-@@ -16,7 +17,6 @@ struct pnp_card *pnp_alloc_card(struct p
-
- int pnp_add_device(struct pnp_dev *dev);
- struct pnp_id *pnp_add_id(struct pnp_dev *dev, char *id);
--int pnp_interface_attach_device(struct pnp_dev *dev);
-
- int pnp_add_card(struct pnp_card *card);
- void pnp_remove_card(struct pnp_card *card);
---- a/drivers/pnp/core.c
-+++ b/drivers/pnp/core.c
-@@ -159,21 +159,13 @@ struct pnp_dev *pnp_alloc_dev(struct pnp
-
- int __pnp_add_device(struct pnp_dev *dev)
- {
-- int ret;
--
- pnp_fixup_device(dev);
- dev->status = PNP_READY;
- spin_lock(&pnp_lock);
- list_add_tail(&dev->global_list, &pnp_global);
- list_add_tail(&dev->protocol_list, &dev->protocol->devices);
- spin_unlock(&pnp_lock);
--
-- ret = device_register(&dev->dev);
-- if (ret)
-- return ret;
--
-- pnp_interface_attach_device(dev);
-- return 0;
-+ return device_register(&dev->dev);
- }
-
- /*
---- a/drivers/pnp/driver.c
-+++ b/drivers/pnp/driver.c
-@@ -206,6 +206,7 @@ struct bus_type pnp_bus_type = {
- .remove = pnp_device_remove,
- .suspend = pnp_bus_suspend,
- .resume = pnp_bus_resume,
-+ .dev_attrs = pnp_interface_attrs,
- };
-
- int pnp_register_driver(struct pnp_driver *drv)
---- a/drivers/pnp/interface.c
-+++ b/drivers/pnp/interface.c
-@@ -243,8 +243,6 @@ static ssize_t pnp_show_options(struct d
- return ret;
- }
-
--static DEVICE_ATTR(options, S_IRUGO, pnp_show_options, NULL);
--
- static ssize_t pnp_show_current_resources(struct device *dmdev,
- struct device_attribute *attr,
- char *buf)
-@@ -420,9 +418,6 @@ done:
- return count;
- }
-
--static DEVICE_ATTR(resources, S_IRUGO | S_IWUSR,
-- pnp_show_current_resources, pnp_set_current_resources);
--
- static ssize_t pnp_show_current_ids(struct device *dmdev,
- struct device_attribute *attr, char *buf)
- {
-@@ -437,27 +432,11 @@ static ssize_t pnp_show_current_ids(stru
- return (str - buf);
- }
-
--static DEVICE_ATTR(id, S_IRUGO, pnp_show_current_ids, NULL);
--
--int pnp_interface_attach_device(struct pnp_dev *dev)
--{
-- int rc = device_create_file(&dev->dev, &dev_attr_options);
--
-- if (rc)
-- goto err;
-- rc = device_create_file(&dev->dev, &dev_attr_resources);
-- if (rc)
-- goto err_opt;
-- rc = device_create_file(&dev->dev, &dev_attr_id);
-- if (rc)
-- goto err_res;
--
-- return 0;
--
--err_res:
-- device_remove_file(&dev->dev, &dev_attr_resources);
--err_opt:
-- device_remove_file(&dev->dev, &dev_attr_options);
--err:
-- return rc;
--}
-+struct device_attribute pnp_interface_attrs[] = {
-+ __ATTR(resources, S_IRUGO | S_IWUSR,
-+ pnp_show_current_resources,
-+ pnp_set_current_resources),
-+ __ATTR(options, S_IRUGO, pnp_show_options, NULL),
-+ __ATTR(id, S_IRUGO, pnp_show_current_ids, NULL),
-+ __ATTR_NULL,
-+};
diff --git a/driver-core/sysfs-crash-debugging.patch b/driver-core/sysfs-crash-debugging.patch
deleted file mode 100644
index e70a37f42729ed..00000000000000
--- a/driver-core/sysfs-crash-debugging.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-From akpm@linux-foundation.org Fri Aug 24 16:12:31 2007
-From: Andrew Morton <akpm@linux-foundation.org>
-Date: Fri, 24 Aug 2007 16:11:54 -0700
-Subject: sysfs: crash debugging
-To: mm-commits@vger.kernel.org
-Cc: akpm@linux-foundation.org, greg@kroah.com, kay.sievers@vrfy.org, mathieu.desnoyers@polymtl.ca
-Message-ID: <200708242311.l7ONBsvq019579@imap1.linux-foundation.org>
-
-From: Andrew Morton <akpm@linux-foundation.org>
-
-Print the name of the last-accessed sysfs file when we oops, to help track
-down oopses which occur in sysfs store/read handlers. Because these oopses
-tend to not leave any trace of the offending code in the stack traces.
-
-Cc: Kay Sievers <kay.sievers@vrfy.org>
-Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
-Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- arch/x86/kernel/dumpstack_32.c | 2 ++
- arch/x86/kernel/dumpstack_64.c | 2 ++
- fs/sysfs/file.c | 13 +++++++++++++
- include/linux/sysfs.h | 6 ++++++
- 4 files changed, 23 insertions(+)
-
---- a/arch/x86/kernel/dumpstack_32.c
-+++ b/arch/x86/kernel/dumpstack_32.c
-@@ -13,6 +13,7 @@
- #include <linux/kexec.h>
- #include <linux/bug.h>
- #include <linux/nmi.h>
-+#include <linux/sysfs.h>
-
- #include <asm/stacktrace.h>
-
-@@ -343,6 +344,7 @@ int __kprobes __die(const char *str, str
- printk("DEBUG_PAGEALLOC");
- #endif
- printk("\n");
-+ sysfs_printk_last_file();
- if (notify_die(DIE_OOPS, str, regs, err,
- current->thread.trap_no, SIGSEGV) == NOTIFY_STOP)
- return 1;
---- a/arch/x86/kernel/dumpstack_64.c
-+++ b/arch/x86/kernel/dumpstack_64.c
-@@ -13,6 +13,7 @@
- #include <linux/kexec.h>
- #include <linux/bug.h>
- #include <linux/nmi.h>
-+#include <linux/sysfs.h>
-
- #include <asm/stacktrace.h>
-
-@@ -489,6 +490,7 @@ int __kprobes __die(const char *str, str
- printk("DEBUG_PAGEALLOC");
- #endif
- printk("\n");
-+ sysfs_printk_last_file();
- if (notify_die(DIE_OOPS, str, regs, err,
- current->thread.trap_no, SIGSEGV) == NOTIFY_STOP)
- return 1;
---- a/fs/sysfs/file.c
-+++ b/fs/sysfs/file.c
-@@ -19,10 +19,18 @@
- #include <linux/poll.h>
- #include <linux/list.h>
- #include <linux/mutex.h>
-+#include <linux/limits.h>
- #include <asm/uaccess.h>
-
- #include "sysfs.h"
-
-+/* used in crash dumps to help with debugging */
-+static char last_sysfs_file[PATH_MAX];
-+void sysfs_printk_last_file(void)
-+{
-+ printk(KERN_EMERG "last sysfs file: %s\n", last_sysfs_file);
-+}
-+
- /*
- * There's one sysfs_buffer for each open file and one
- * sysfs_open_dirent for each sysfs_dirent with one or more open
-@@ -328,6 +336,11 @@ static int sysfs_open_file(struct inode
- struct sysfs_buffer *buffer;
- struct sysfs_ops *ops;
- int error = -EACCES;
-+ char *p;
-+
-+ p = d_path(&file->f_path, last_sysfs_file, sizeof(last_sysfs_file));
-+ if (p)
-+ memmove(last_sysfs_file, p, strlen(p) + 1);
-
- /* need attr_sd for attr and ops, its parent for kobj */
- if (!sysfs_get_active_two(attr_sd))
---- a/include/linux/sysfs.h
-+++ b/include/linux/sysfs.h
-@@ -119,6 +119,8 @@ void sysfs_remove_file_from_group(struct
-
- void sysfs_notify(struct kobject *kobj, char *dir, char *attr);
-
-+void sysfs_printk_last_file(void);
-+
- extern int __must_check sysfs_init(void);
-
- #else /* CONFIG_SYSFS */
-@@ -231,6 +233,10 @@ static inline int __must_check sysfs_ini
- return 0;
- }
-
-+static inline void sysfs_printk_last_file(void)
-+{
-+}
-+
- #endif /* CONFIG_SYSFS */
-
- #endif /* _SYSFS_H_ */
diff --git a/driver-core/sysfs-fix-deadlock.patch b/driver-core/sysfs-fix-deadlock.patch
deleted file mode 100644
index e0b126c13142f8..00000000000000
--- a/driver-core/sysfs-fix-deadlock.patch
+++ /dev/null
@@ -1,196 +0,0 @@
-From mingo@elte.hu Mon Sep 15 10:07:45 2008
-From: Nick Piggin <npiggin@suse.de>
-Date: Fri, 12 Sep 2008 11:24:11 +0200
-Subject: sysfs: fix deadlock
-To: Nick Piggin <npiggin@suse.de>
-Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>, Greg Kroah-Hartman <gregkh@suse.de>, Andrew Morton <akpm@linux-foundation.org>
-Message-ID: <20080912092411.GB10305@elte.hu>
-Content-Disposition: inline
-
-From: Nick Piggin <npiggin@suse.de>
-
-On Thu, Sep 11, 2008 at 10:27:10AM +0200, Ingo Molnar wrote:
-
-> and it's working fine on most boxes. One testbox found this new locking
-> scenario:
->
-> PM: Adding info for No Bus:vcsa7
-> EDAC DEBUG: MC0: i82860_check()
->
-> =======================================================
-> [ INFO: possible circular locking dependency detected ]
-> 2.6.27-rc6-tip #1
-> -------------------------------------------------------
-> X/4873 is trying to acquire lock:
-> (&bb->mutex){--..}, at: [<c020ba20>] mmap+0x40/0xa0
->
-> but task is already holding lock:
-> (&mm->mmap_sem){----}, at: [<c0125a1e>] sys_mmap2+0x8e/0xc0
->
-> which lock already depends on the new lock.
->
->
-> the existing dependency chain (in reverse order) is:
->
-> -> #1 (&mm->mmap_sem){----}:
-> [<c017dc96>] validate_chain+0xa96/0xf50
-> [<c017ef2b>] __lock_acquire+0x2cb/0x5b0
-> [<c017f299>] lock_acquire+0x89/0xc0
-> [<c01aa8fb>] might_fault+0x6b/0x90
-> [<c040b618>] copy_to_user+0x38/0x60
-> [<c020bcfb>] read+0xfb/0x170
-> [<c01c09a5>] vfs_read+0x95/0x110
-> [<c01c1443>] sys_pread64+0x63/0x80
-> [<c012146f>] sysenter_do_call+0x12/0x43
-> [<ffffffff>] 0xffffffff
->
-> -> #0 (&bb->mutex){--..}:
-> [<c017d8b7>] validate_chain+0x6b7/0xf50
-> [<c017ef2b>] __lock_acquire+0x2cb/0x5b0
-> [<c017f299>] lock_acquire+0x89/0xc0
-> [<c0d6f2ab>] __mutex_lock_common+0xab/0x3c0
-> [<c0d6f698>] mutex_lock_nested+0x38/0x50
-> [<c020ba20>] mmap+0x40/0xa0
-> [<c01b111e>] mmap_region+0x14e/0x450
-> [<c01b170f>] do_mmap_pgoff+0x2ef/0x310
-> [<c0125a3d>] sys_mmap2+0xad/0xc0
-> [<c012146f>] sysenter_do_call+0x12/0x43
-> [<ffffffff>] 0xffffffff
->
-> other info that might help us debug this:
->
-> 1 lock held by X/4873:
-> #0: (&mm->mmap_sem){----}, at: [<c0125a1e>] sys_mmap2+0x8e/0xc0
->
-> stack backtrace:
-> Pid: 4873, comm: X Not tainted 2.6.27-rc6-tip #1
-> [<c017cd09>] print_circular_bug_tail+0x79/0xc0
-> [<c017d8b7>] validate_chain+0x6b7/0xf50
-> [<c017a5b5>] ? trace_hardirqs_off_caller+0x15/0xb0
-> [<c017ef2b>] __lock_acquire+0x2cb/0x5b0
-> [<c017f299>] lock_acquire+0x89/0xc0
-> [<c020ba20>] ? mmap+0x40/0xa0
-> [<c0d6f2ab>] __mutex_lock_common+0xab/0x3c0
-> [<c020ba20>] ? mmap+0x40/0xa0
-> [<c0d6f698>] mutex_lock_nested+0x38/0x50
-> [<c020ba20>] ? mmap+0x40/0xa0
-> [<c020ba20>] mmap+0x40/0xa0
-> [<c01b111e>] mmap_region+0x14e/0x450
-> [<c01afb88>] ? arch_get_unmapped_area_topdown+0xf8/0x160
-> [<c01b170f>] do_mmap_pgoff+0x2ef/0x310
-> [<c0125a3d>] sys_mmap2+0xad/0xc0
-> [<c012146f>] sysenter_do_call+0x12/0x43
-> [<c0120000>] ? __switch_to+0x130/0x220
-> =======================
-> evbug.c: Event. Dev: input3, Type: 20, Code: 0, Value: 500
-> warning: `sudo' uses deprecated v2 capabilities in a way that may be insecure.
->
-> i've attached the config.
->
-> at first sight it looks like a genuine bug in fs/sysfs/bin.c?
-
-Yes, it is a real bug by the looks. bin.c takes bb->mutex under mmap_sem
-when it is mmapped, and then does its copy_*_user under bb->mutex too.
-
-Here is a basic fix for the sysfs lor.
-
-
-From: Nick Piggin <npiggin@suse.de>
-Signed-off-by: Ingo Molnar <mingo@elte.hu>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- fs/sysfs/bin.c | 42 +++++++++++++++++++++++++++++++-----------
- 1 file changed, 31 insertions(+), 11 deletions(-)
-
---- a/fs/sysfs/bin.c
-+++ b/fs/sysfs/bin.c
-@@ -61,6 +61,7 @@ read(struct file *file, char __user *use
- int size = dentry->d_inode->i_size;
- loff_t offs = *off;
- int count = min_t(size_t, bytes, PAGE_SIZE);
-+ char *temp;
-
- if (size) {
- if (offs > size)
-@@ -69,23 +70,33 @@ read(struct file *file, char __user *use
- count = size - offs;
- }
-
-+ temp = kmalloc(count, GFP_KERNEL);
-+ if (!temp)
-+ return -ENOMEM;
-+
- mutex_lock(&bb->mutex);
-
- count = fill_read(dentry, bb->buffer, offs, count);
-- if (count < 0)
-- goto out_unlock;
-+ if (count < 0) {
-+ mutex_unlock(&bb->mutex);
-+ goto out_free;
-+ }
-
-- if (copy_to_user(userbuf, bb->buffer, count)) {
-+ memcpy(temp, bb->buffer, count);
-+
-+ mutex_unlock(&bb->mutex);
-+
-+ if (copy_to_user(userbuf, temp, count)) {
- count = -EFAULT;
-- goto out_unlock;
-+ goto out_free;
- }
-
- pr_debug("offs = %lld, *off = %lld, count = %d\n", offs, *off, count);
-
- *off = offs + count;
-
-- out_unlock:
-- mutex_unlock(&bb->mutex);
-+ out_free:
-+ kfree(temp);
- return count;
- }
-
-@@ -118,6 +129,7 @@ static ssize_t write(struct file *file,
- int size = dentry->d_inode->i_size;
- loff_t offs = *off;
- int count = min_t(size_t, bytes, PAGE_SIZE);
-+ char *temp;
-
- if (size) {
- if (offs > size)
-@@ -126,19 +138,27 @@ static ssize_t write(struct file *file,
- count = size - offs;
- }
-
-- mutex_lock(&bb->mutex);
-+ temp = kmalloc(count, GFP_KERNEL);
-+ if (!temp)
-+ return -ENOMEM;
-
-- if (copy_from_user(bb->buffer, userbuf, count)) {
-+ if (copy_from_user(temp, userbuf, count)) {
- count = -EFAULT;
-- goto out_unlock;
-+ goto out_free;
- }
-
-+ mutex_lock(&bb->mutex);
-+
-+ memcpy(bb->buffer, temp, count);
-+
- count = flush_write(dentry, bb->buffer, offs, count);
-+ mutex_unlock(&bb->mutex);
-+
- if (count > 0)
- *off = offs + count;
-
-- out_unlock:
-- mutex_unlock(&bb->mutex);
-+out_free:
-+ kfree(temp);
- return count;
- }
-
diff --git a/driver-core/sysfs-make-dir-and-name-args-to-sysfs_notify-const.patch b/driver-core/sysfs-make-dir-and-name-args-to-sysfs_notify-const.patch
deleted file mode 100644
index 9f2f26e1e4bf82..00000000000000
--- a/driver-core/sysfs-make-dir-and-name-args-to-sysfs_notify-const.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From tpiepho@freescale.com Wed Oct 1 14:10:05 2008
-From: Trent Piepho <tpiepho@freescale.com>
-Date: Thu, 25 Sep 2008 16:45:13 -0700
-Subject: sysfs: Make dir and name args to sysfs_notify() const
-To: linux-kernel@vger.kernel.org
-Cc: Greg Kroah-Hartman <gregkh@suse.de>, Trent Piepho <tpiepho@freescale.com>, NeilBrown <neilb@suse.de>
-Message-ID: <1222386313-18401-1-git-send-email-tpiepho@freescale.com>
-
-From: Trent Piepho <tpiepho@freescale.com>
-
-Because they can be, and because code like this produces a warning if
-they're not:
-
-struct device_attribute dev_attr;
-
-sysfs_notify(&kobj, NULL, dev_attr.attr.name);
-
-Signed-off-by: Trent Piepho <tpiepho@freescale.com>
-CC: Neil Brown <neilb@suse.de>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- fs/sysfs/file.c | 2 +-
- include/linux/sysfs.h | 5 +++--
- 2 files changed, 4 insertions(+), 3 deletions(-)
-
---- a/fs/sysfs/file.c
-+++ b/fs/sysfs/file.c
-@@ -469,7 +469,7 @@ void sysfs_notify_dirent(struct sysfs_di
- }
- EXPORT_SYMBOL_GPL(sysfs_notify_dirent);
-
--void sysfs_notify(struct kobject *k, char *dir, char *attr)
-+void sysfs_notify(struct kobject *k, const char *dir, const char *attr)
- {
- struct sysfs_dirent *sd = k->sd;
-
---- a/include/linux/sysfs.h
-+++ b/include/linux/sysfs.h
-@@ -119,7 +119,7 @@ int sysfs_add_file_to_group(struct kobje
- void sysfs_remove_file_from_group(struct kobject *kobj,
- const struct attribute *attr, const char *group);
-
--void sysfs_notify(struct kobject *kobj, char *dir, char *attr);
-+void sysfs_notify(struct kobject *kobj, const char *dir, const char *attr);
- void sysfs_notify_dirent(struct sysfs_dirent *sd);
- struct sysfs_dirent *sysfs_get_dirent(struct sysfs_dirent *parent_sd,
- const unsigned char *name);
-@@ -229,7 +229,8 @@ static inline void sysfs_remove_file_fro
- {
- }
-
--static inline void sysfs_notify(struct kobject *kobj, char *dir, char *attr)
-+static inline void sysfs_notify(struct kobject *kobj, const char *dir,
-+ const char *attr)
- {
- }
- static inline void sysfs_notify_dirent(struct sysfs_dirent *sd)
diff --git a/driver-core/sysfs-support-sysfs_notify-from-atomic-context-with-new-sysfs_notify_dirent.patch b/driver-core/sysfs-support-sysfs_notify-from-atomic-context-with-new-sysfs_notify_dirent.patch
deleted file mode 100644
index 6b13cce5f135d0..00000000000000
--- a/driver-core/sysfs-support-sysfs_notify-from-atomic-context-with-new-sysfs_notify_dirent.patch
+++ /dev/null
@@ -1,202 +0,0 @@
-From neilb@suse.de Thu Jul 31 10:33:43 2008
-From: Neil Brown <neilb@suse.de>
-Date: Wed, 16 Jul 2008 08:58:04 +1000
-Subject: sysfs: Support sysfs_notify from atomic context with new sysfs_notify_dirent
-To: Greg K-H <gregkh@suse.de>, Tejun Heo <teheo@suse.de>
-Cc: linux-kernel@vger.kernel.org
-Message-ID: <18557.11132.728439.827572@notabene.brown>
-
-
-Support sysfs_notify from atomic context with new sysfs_notify_dirent
-
-sysfs_notify currently takes sysfs_mutex.
-This means that it cannot be called in atomic context.
-sysfs_mutex is sometimes held over a malloc (sysfs_rename_dir)
-so it can block on low memory.
-
-In md I want to be able to notify on a sysfs attribute from
-atomic context, and I don't want to block on low memory because I
-could be in the writeout path for freeing memory.
-
-So:
- - export the "sysfs_dirent" structure along with sysfs_get, sysfs_put
- and sysfs_get_dirent so I can get the sysfs_dirent that I want to
- notify on and hold it in an md structure.
- - split sysfs_notify_dirent out of sysfs_notify so the sysfs_dirent
- can be notified on with no blocking (just a spinlock).
-
-Signed-off-by: Neil Brown <neilb@suse.de>
-Acked-by: Tejun Heo <tj@kernel.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- fs/sysfs/dir.c | 1 +
- fs/sysfs/file.c | 31 ++++++++++++++++++-------------
- fs/sysfs/mount.c | 15 +++++++++++++++
- fs/sysfs/sysfs.h | 6 ++++--
- include/linux/sysfs.h | 27 ++++++++++++++++++++++++---
- 5 files changed, 62 insertions(+), 18 deletions(-)
-
---- a/fs/sysfs/dir.c
-+++ b/fs/sysfs/dir.c
-@@ -636,6 +636,7 @@ struct sysfs_dirent *sysfs_get_dirent(st
-
- return sd;
- }
-+EXPORT_SYMBOL_GPL(sysfs_get_dirent);
-
- static int create_dir(struct kobject *kobj, struct sysfs_dirent *parent_sd,
- const char *name, struct sysfs_dirent **p_sd)
---- a/fs/sysfs/file.c
-+++ b/fs/sysfs/file.c
-@@ -453,6 +453,22 @@ static unsigned int sysfs_poll(struct fi
- return POLLERR|POLLPRI;
- }
-
-+void sysfs_notify_dirent(struct sysfs_dirent *sd)
-+{
-+ struct sysfs_open_dirent *od;
-+
-+ spin_lock(&sysfs_open_dirent_lock);
-+
-+ od = sd->s_attr.open;
-+ if (od) {
-+ atomic_inc(&od->event);
-+ wake_up_interruptible(&od->poll);
-+ }
-+
-+ spin_unlock(&sysfs_open_dirent_lock);
-+}
-+EXPORT_SYMBOL_GPL(sysfs_notify_dirent);
-+
- void sysfs_notify(struct kobject *k, char *dir, char *attr)
- {
- struct sysfs_dirent *sd = k->sd;
-@@ -463,19 +479,8 @@ void sysfs_notify(struct kobject *k, cha
- sd = sysfs_find_dirent(sd, dir);
- if (sd && attr)
- sd = sysfs_find_dirent(sd, attr);
-- if (sd) {
-- struct sysfs_open_dirent *od;
--
-- spin_lock(&sysfs_open_dirent_lock);
--
-- od = sd->s_attr.open;
-- if (od) {
-- atomic_inc(&od->event);
-- wake_up_interruptible(&od->poll);
-- }
--
-- spin_unlock(&sysfs_open_dirent_lock);
-- }
-+ if (sd)
-+ sysfs_notify_dirent(sd);
-
- mutex_unlock(&sysfs_mutex);
- }
---- a/fs/sysfs/mount.c
-+++ b/fs/sysfs/mount.c
-@@ -16,6 +16,7 @@
- #include <linux/mount.h>
- #include <linux/pagemap.h>
- #include <linux/init.h>
-+#include <linux/module.h>
-
- #include "sysfs.h"
-
-@@ -115,3 +116,17 @@ out_err:
- sysfs_dir_cachep = NULL;
- goto out;
- }
-+
-+#undef sysfs_get
-+struct sysfs_dirent *sysfs_get(struct sysfs_dirent *sd)
-+{
-+ return __sysfs_get(sd);
-+}
-+EXPORT_SYMBOL_GPL(sysfs_get);
-+
-+#undef sysfs_put
-+void sysfs_put(struct sysfs_dirent *sd)
-+{
-+ __sysfs_put(sd);
-+}
-+EXPORT_SYMBOL_GPL(sysfs_put);
---- a/fs/sysfs/sysfs.h
-+++ b/fs/sysfs/sysfs.h
-@@ -124,7 +124,7 @@ int sysfs_create_subdir(struct kobject *
- struct sysfs_dirent **p_sd);
- void sysfs_remove_subdir(struct sysfs_dirent *sd);
-
--static inline struct sysfs_dirent *sysfs_get(struct sysfs_dirent *sd)
-+static inline struct sysfs_dirent *__sysfs_get(struct sysfs_dirent *sd)
- {
- if (sd) {
- WARN_ON(!atomic_read(&sd->s_count));
-@@ -132,12 +132,14 @@ static inline struct sysfs_dirent *sysfs
- }
- return sd;
- }
-+#define sysfs_get(sd) __sysfs_get(sd)
-
--static inline void sysfs_put(struct sysfs_dirent *sd)
-+static inline void __sysfs_put(struct sysfs_dirent *sd)
- {
- if (sd && atomic_dec_and_test(&sd->s_count))
- release_sysfs_dirent(sd);
- }
-+#define sysfs_put(sd) __sysfs_put(sd)
-
- /*
- * inode.c
---- a/include/linux/sysfs.h
-+++ b/include/linux/sysfs.h
-@@ -78,6 +78,8 @@ struct sysfs_ops {
- ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t);
- };
-
-+struct sysfs_dirent;
-+
- #ifdef CONFIG_SYSFS
-
- int sysfs_schedule_callback(struct kobject *kobj, void (*func)(void *),
-@@ -118,10 +120,13 @@ void sysfs_remove_file_from_group(struct
- const struct attribute *attr, const char *group);
-
- void sysfs_notify(struct kobject *kobj, char *dir, char *attr);
--
-+void sysfs_notify_dirent(struct sysfs_dirent *sd);
-+struct sysfs_dirent *sysfs_get_dirent(struct sysfs_dirent *parent_sd,
-+ const unsigned char *name);
-+struct sysfs_dirent *sysfs_get(struct sysfs_dirent *sd);
-+void sysfs_put(struct sysfs_dirent *sd);
- void sysfs_printk_last_file(void);
--
--extern int __must_check sysfs_init(void);
-+int __must_check sysfs_init(void);
-
- #else /* CONFIG_SYSFS */
-
-@@ -227,6 +232,22 @@ static inline void sysfs_remove_file_fro
- static inline void sysfs_notify(struct kobject *kobj, char *dir, char *attr)
- {
- }
-+static inline void sysfs_notify_dirent(struct sysfs_dirent *sd)
-+{
-+}
-+static inline
-+struct sysfs_dirent *sysfs_get_dirent(struct sysfs_dirent *parent_sd,
-+ const unsigned char *name)
-+{
-+ return NULL;
-+}
-+static inline struct sysfs_dirent *sysfs_get(struct sysfs_dirent *sd)
-+{
-+ return NULL;
-+}
-+static inline void sysfs_put(struct sysfs_dirent *sd)
-+{
-+}
-
- static inline int __must_check sysfs_init(void)
- {
diff --git a/driver-core/sysfs-use-ilookup5-instead-of-ilookup5_nowait.patch b/driver-core/sysfs-use-ilookup5-instead-of-ilookup5_nowait.patch
deleted file mode 100644
index f730fea6e17c77..00000000000000
--- a/driver-core/sysfs-use-ilookup5-instead-of-ilookup5_nowait.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From tj@kernel.org Wed Oct 1 13:34:14 2008
-From: Tejun Heo <tj@kernel.org>
-Date: Sun, 28 Sep 2008 07:48:08 +0900
-Subject: sysfs: use ilookup5() instead of ilookup5_nowait()
-To: Greg KH <greg@kroah.com>, viro@hera.kernel.org, Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
-Message-ID: <48DEB828.3020408@kernel.org>
-
-From: Tejun Heo <tj@kernel.org>
-
-As inode creation is protected by sysfs_mutex, ilookup5_nowait()
-always either fails to find at all or finds one which is fully
-initialized, so using ilookup5_nowait() or ilookup5() doesn't make any
-difference. Switch to ilookup5() as it's planned to be removed. This
-change also makes lookup return value handling a bit simpler.
-
-This change was suggested by Al Viro.
-
-Signed-off-by: Tejun Heo <tj@kernel.org>
-Cc: Al Viro <viro@hera.kernel.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- fs/sysfs/dir.c | 17 ++++++++---------
- 1 file changed, 8 insertions(+), 9 deletions(-)
-
---- a/fs/sysfs/dir.c
-+++ b/fs/sysfs/dir.c
-@@ -370,17 +370,17 @@ void sysfs_addrm_start(struct sysfs_addr
- memset(acxt, 0, sizeof(*acxt));
- acxt->parent_sd = parent_sd;
-
-- /* Lookup parent inode. inode initialization and I_NEW
-- * clearing are protected by sysfs_mutex. By grabbing it and
-- * looking up with _nowait variant, inode state can be
-- * determined reliably.
-+ /* Lookup parent inode. inode initialization is protected by
-+ * sysfs_mutex, so inode existence can be determined by
-+ * looking up inode while holding sysfs_mutex.
- */
- mutex_lock(&sysfs_mutex);
-
-- inode = ilookup5_nowait(sysfs_sb, parent_sd->s_ino, sysfs_ilookup_test,
-- parent_sd);
-+ inode = ilookup5(sysfs_sb, parent_sd->s_ino, sysfs_ilookup_test,
-+ parent_sd);
-+ if (inode) {
-+ WARN_ON(inode->i_state & I_NEW);
-
-- if (inode && !(inode->i_state & I_NEW)) {
- /* parent inode available */
- acxt->parent_inode = inode;
-
-@@ -393,8 +393,7 @@ void sysfs_addrm_start(struct sysfs_addr
- mutex_lock(&inode->i_mutex);
- mutex_lock(&sysfs_mutex);
- }
-- } else
-- iput(inode);
-+ }
- }
-
- /**
diff --git a/driver-core/uio-add-alignment-warnings-for-uio-mem.patch b/driver-core/uio-add-alignment-warnings-for-uio-mem.patch
deleted file mode 100644
index e798c099b444c2..00000000000000
--- a/driver-core/uio-add-alignment-warnings-for-uio-mem.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From hjk@linutronix.de Tue Sep 23 15:59:05 2008
-From: Hans J. Koch <hjk@linutronix.de>
-Date: Thu, 18 Sep 2008 23:53:18 +0200
-Subject: UIO: Add alignment warnings for uio-mem
-To: Wolfram Sang <w.sang@pengutronix.de>
-Cc: linux-kernel@vger.kernel.org, hjk@linutronix.de, gregkh@suse.de
-Message-ID: <20080918215318.GD2991@local>
-Content-Disposition: inline
-
-From: Hans J. Koch <hjk@linutronix.de>
-
-This patch adds an "offset" attribute for UIO mappings. It shows the
-difference between the actual start address of the memory and the start
-address of the page.
-
-Signed-off-by: Hans J. Koch <hjk@linutronix.de>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/uio/uio.c | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
---- a/drivers/uio/uio.c
-+++ b/drivers/uio/uio.c
-@@ -67,6 +67,11 @@ static ssize_t map_size_show(struct uio_
- return sprintf(buf, "0x%lx\n", mem->size);
- }
-
-+static ssize_t map_offset_show(struct uio_mem *mem, char *buf)
-+{
-+ return sprintf(buf, "0x%lx\n", mem->addr & ~PAGE_MASK);
-+}
-+
- struct uio_sysfs_entry {
- struct attribute attr;
- ssize_t (*show)(struct uio_mem *, char *);
-@@ -77,10 +82,13 @@ static struct uio_sysfs_entry addr_attri
- __ATTR(addr, S_IRUGO, map_addr_show, NULL);
- static struct uio_sysfs_entry size_attribute =
- __ATTR(size, S_IRUGO, map_size_show, NULL);
-+static struct uio_sysfs_entry offset_attribute =
-+ __ATTR(offset, S_IRUGO, map_offset_show, NULL);
-
- static struct attribute *attrs[] = {
- &addr_attribute.attr,
- &size_attribute.attr,
-+ &offset_attribute.attr,
- NULL, /* need to NULL terminate the list of attributes */
- };
-
diff --git a/driver-core/uio-add-automata-sercos3-pci-card-support.patch b/driver-core/uio-add-automata-sercos3-pci-card-support.patch
deleted file mode 100644
index 0b5ce96d2a8933..00000000000000
--- a/driver-core/uio-add-automata-sercos3-pci-card-support.patch
+++ /dev/null
@@ -1,304 +0,0 @@
-From john.ogness@linutronix.de Tue Sep 23 16:00:24 2008
-From: John Ogness <john.ogness@linutronix.de>
-Date: Thu, 18 Sep 2008 11:57:15 +0200
-Subject: UIO: add automata sercos3 pci card support
-To: "Hans J. Koch" <hjk@linutronix.de>
-Cc: Greg Kroah-Hartman <gregkh@suse.de>, linux-kernel@vger.kernel.org
-Message-ID: <867i99u684.fsf_-_@johno-ibook.fn.ogness.net>
-
-
-Here is a new version of the patch to support the Automata Sercos III
-PCI card driver. I now check that the IRQ is enabled before accepting
-the interrupt.
-
-I still use a logical OR to store the enabled interrupts and I've
-added a second use of a logical OR when restoring the enabled
-interrupts. I added an explanation of why I do this in comments at the
-top of the source file.
-
-Since I use a logical OR, I also removed the extra checks if the
-Interrupt Enable Register and ier0_cache are 0.
-
-Signed-off-by: John Ogness <john.ogness@linutronix.de>
-Signed-off-by: Hans J. Koch <hjk@linutronix.de>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/uio/Kconfig | 13 ++
- drivers/uio/Makefile | 1
- drivers/uio/uio_sercos3.c | 243 ++++++++++++++++++++++++++++++++++++++++++++++
- 3 files changed, 257 insertions(+)
-
---- a/drivers/uio/Kconfig
-+++ b/drivers/uio/Kconfig
-@@ -58,4 +58,17 @@ config UIO_SMX
-
- If you compile this as a module, it will be called uio_smx.
-
-+config UIO_SERCOS3
-+ tristate "Automata Sercos III PCI card driver"
-+ default n
-+ help
-+ Userspace I/O interface for the Sercos III PCI card from
-+ Automata GmbH. The userspace part of this driver will be
-+ available for download from the Automata GmbH web site.
-+
-+ Automata GmbH: http://www.automataweb.com
-+ Sercos III interface: http://www.sercos.com
-+
-+ If you compile this as a module, it will be called uio_sercos3.
-+
- endif
---- a/drivers/uio/Makefile
-+++ b/drivers/uio/Makefile
-@@ -3,3 +3,4 @@ obj-$(CONFIG_UIO_CIF) += uio_cif.o
- obj-$(CONFIG_UIO_PDRV) += uio_pdrv.o
- obj-$(CONFIG_UIO_PDRV_GENIRQ) += uio_pdrv_genirq.o
- obj-$(CONFIG_UIO_SMX) += uio_smx.o
-+obj-$(CONFIG_UIO_SERCOS3) += uio_sercos3.o
---- /dev/null
-+++ b/drivers/uio/uio_sercos3.c
-@@ -0,0 +1,243 @@
-+/* sercos3: UIO driver for the Automata Sercos III PCI card
-+
-+ Copyright (C) 2008 Linutronix GmbH
-+ Author: John Ogness <john.ogness@linutronix.de>
-+
-+ This is a straight-forward UIO driver, where interrupts are disabled
-+ by the interrupt handler and re-enabled via a write to the UIO device
-+ by the userspace-part.
-+
-+ The only part that may seem odd is the use of a logical OR when
-+ storing and restoring enabled interrupts. This is done because the
-+ userspace-part could directly modify the Interrupt Enable Register
-+ at any time. To reduce possible conflicts, the kernel driver uses
-+ a logical OR to make more controlled changes (rather than blindly
-+ overwriting previous values).
-+
-+ Race conditions exist if the userspace-part directly modifies the
-+ Interrupt Enable Register while in operation. The consequences are
-+ that certain interrupts would fail to be enabled or disabled. For
-+ this reason, the userspace-part should only directly modify the
-+ Interrupt Enable Register at the beginning (to get things going).
-+ The userspace-part can safely disable interrupts at any time using
-+ a write to the UIO device.
-+*/
-+
-+#include <linux/device.h>
-+#include <linux/module.h>
-+#include <linux/pci.h>
-+#include <linux/uio_driver.h>
-+#include <linux/io.h>
-+
-+/* ID's for SERCOS III PCI card (PLX 9030) */
-+#define SERCOS_SUB_VENDOR_ID 0x1971
-+#define SERCOS_SUB_SYSID_3530 0x3530
-+#define SERCOS_SUB_SYSID_3535 0x3535
-+#define SERCOS_SUB_SYSID_3780 0x3780
-+
-+/* Interrupt Enable Register */
-+#define IER0_OFFSET 0x08
-+
-+/* Interrupt Status Register */
-+#define ISR0_OFFSET 0x18
-+
-+struct sercos3_priv {
-+ u32 ier0_cache;
-+ spinlock_t ier0_cache_lock;
-+};
-+
-+/* this function assumes ier0_cache_lock is locked! */
-+static void sercos3_disable_interrupts(struct uio_info *info,
-+ struct sercos3_priv *priv)
-+{
-+ void __iomem *ier0 = info->mem[3].internal_addr + IER0_OFFSET;
-+
-+ /* add enabled interrupts to cache */
-+ priv->ier0_cache |= ioread32(ier0);
-+
-+ /* disable interrupts */
-+ iowrite32(0, ier0);
-+}
-+
-+/* this function assumes ier0_cache_lock is locked! */
-+static void sercos3_enable_interrupts(struct uio_info *info,
-+ struct sercos3_priv *priv)
-+{
-+ void __iomem *ier0 = info->mem[3].internal_addr + IER0_OFFSET;
-+
-+ /* restore previously enabled interrupts */
-+ iowrite32(ioread32(ier0) | priv->ier0_cache, ier0);
-+ priv->ier0_cache = 0;
-+}
-+
-+static irqreturn_t sercos3_handler(int irq, struct uio_info *info)
-+{
-+ struct sercos3_priv *priv = info->priv;
-+ void __iomem *isr0 = info->mem[3].internal_addr + ISR0_OFFSET;
-+ void __iomem *ier0 = info->mem[3].internal_addr + IER0_OFFSET;
-+
-+ if (!(ioread32(isr0) & ioread32(ier0)))
-+ return IRQ_NONE;
-+
-+ spin_lock(&priv->ier0_cache_lock);
-+ sercos3_disable_interrupts(info, priv);
-+ spin_unlock(&priv->ier0_cache_lock);
-+
-+ return IRQ_HANDLED;
-+}
-+
-+static int sercos3_irqcontrol(struct uio_info *info, s32 irq_on)
-+{
-+ struct sercos3_priv *priv = info->priv;
-+
-+ spin_lock_irq(&priv->ier0_cache_lock);
-+ if (irq_on)
-+ sercos3_enable_interrupts(info, priv);
-+ else
-+ sercos3_disable_interrupts(info, priv);
-+ spin_unlock_irq(&priv->ier0_cache_lock);
-+
-+ return 0;
-+}
-+
-+static int sercos3_setup_iomem(struct pci_dev *dev, struct uio_info *info,
-+ int n, int pci_bar)
-+{
-+ info->mem[n].addr = pci_resource_start(dev, pci_bar);
-+ if (!info->mem[n].addr)
-+ return -1;
-+ info->mem[n].internal_addr = ioremap(pci_resource_start(dev, pci_bar),
-+ pci_resource_len(dev, pci_bar));
-+ if (!info->mem[n].internal_addr)
-+ return -1;
-+ info->mem[n].size = pci_resource_len(dev, pci_bar);
-+ info->mem[n].memtype = UIO_MEM_PHYS;
-+ return 0;
-+}
-+
-+static int __devinit sercos3_pci_probe(struct pci_dev *dev,
-+ const struct pci_device_id *id)
-+{
-+ struct uio_info *info;
-+ struct sercos3_priv *priv;
-+ int i;
-+
-+ info = kzalloc(sizeof(struct uio_info), GFP_KERNEL);
-+ if (!info)
-+ return -ENOMEM;
-+
-+ priv = kzalloc(sizeof(struct sercos3_priv), GFP_KERNEL);
-+ if (!priv)
-+ goto out_free;
-+
-+ if (pci_enable_device(dev))
-+ goto out_free_priv;
-+
-+ if (pci_request_regions(dev, "sercos3"))
-+ goto out_disable;
-+
-+ /* we only need PCI BAR's 0, 2, 3, 4, 5 */
-+ if (sercos3_setup_iomem(dev, info, 0, 0))
-+ goto out_unmap;
-+ if (sercos3_setup_iomem(dev, info, 1, 2))
-+ goto out_unmap;
-+ if (sercos3_setup_iomem(dev, info, 2, 3))
-+ goto out_unmap;
-+ if (sercos3_setup_iomem(dev, info, 3, 4))
-+ goto out_unmap;
-+ if (sercos3_setup_iomem(dev, info, 4, 5))
-+ goto out_unmap;
-+
-+ spin_lock_init(&priv->ier0_cache_lock);
-+ info->priv = priv;
-+ info->name = "Sercos_III_PCI";
-+ info->version = "0.0.1";
-+ info->irq = dev->irq;
-+ info->irq_flags = IRQF_DISABLED | IRQF_SHARED;
-+ info->handler = sercos3_handler;
-+ info->irqcontrol = sercos3_irqcontrol;
-+
-+ pci_set_drvdata(dev, info);
-+
-+ if (uio_register_device(&dev->dev, info))
-+ goto out_unmap;
-+
-+ return 0;
-+
-+out_unmap:
-+ for (i = 0; i < 5; i++) {
-+ if (info->mem[i].internal_addr)
-+ iounmap(info->mem[i].internal_addr);
-+ }
-+ pci_release_regions(dev);
-+out_disable:
-+ pci_disable_device(dev);
-+out_free_priv:
-+ kfree(priv);
-+out_free:
-+ kfree(info);
-+ return -ENODEV;
-+}
-+
-+static void sercos3_pci_remove(struct pci_dev *dev)
-+{
-+ struct uio_info *info = pci_get_drvdata(dev);
-+ int i;
-+
-+ uio_unregister_device(info);
-+ pci_release_regions(dev);
-+ pci_disable_device(dev);
-+ pci_set_drvdata(dev, NULL);
-+ for (i = 0; i < 5; i++) {
-+ if (info->mem[i].internal_addr)
-+ iounmap(info->mem[i].internal_addr);
-+ }
-+ kfree(info->priv);
-+ kfree(info);
-+}
-+
-+static struct pci_device_id sercos3_pci_ids[] __devinitdata = {
-+ {
-+ .vendor = PCI_VENDOR_ID_PLX,
-+ .device = PCI_DEVICE_ID_PLX_9030,
-+ .subvendor = SERCOS_SUB_VENDOR_ID,
-+ .subdevice = SERCOS_SUB_SYSID_3530,
-+ },
-+ {
-+ .vendor = PCI_VENDOR_ID_PLX,
-+ .device = PCI_DEVICE_ID_PLX_9030,
-+ .subvendor = SERCOS_SUB_VENDOR_ID,
-+ .subdevice = SERCOS_SUB_SYSID_3535,
-+ },
-+ {
-+ .vendor = PCI_VENDOR_ID_PLX,
-+ .device = PCI_DEVICE_ID_PLX_9030,
-+ .subvendor = SERCOS_SUB_VENDOR_ID,
-+ .subdevice = SERCOS_SUB_SYSID_3780,
-+ },
-+ { 0, }
-+};
-+
-+static struct pci_driver sercos3_pci_driver = {
-+ .name = "sercos3",
-+ .id_table = sercos3_pci_ids,
-+ .probe = sercos3_pci_probe,
-+ .remove = sercos3_pci_remove,
-+};
-+
-+static int __init sercos3_init_module(void)
-+{
-+ return pci_register_driver(&sercos3_pci_driver);
-+}
-+
-+static void __exit sercos3_exit_module(void)
-+{
-+ pci_unregister_driver(&sercos3_pci_driver);
-+}
-+
-+module_init(sercos3_init_module);
-+module_exit(sercos3_exit_module);
-+
-+MODULE_DESCRIPTION("UIO driver for the Automata Sercos III PCI card");
-+MODULE_AUTHOR("John Ogness <john.ogness@linutronix.de>");
-+MODULE_LICENSE("GPL v2");
diff --git a/driver-core/uio-change-driver-name-of-uio_pdrv.patch b/driver-core/uio-change-driver-name-of-uio_pdrv.patch
deleted file mode 100644
index 0b7094827f4233..00000000000000
--- a/driver-core/uio-change-driver-name-of-uio_pdrv.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From hjk@linutronix.de Tue Sep 23 15:59:56 2008
-From: "Hans J. Koch" <hjk@linutronix.de>
-Date: Thu, 18 Sep 2008 23:03:07 +0200
-Subject: UIO: Change driver name of uio_pdrv
-To: Greg KH <gregkh@suse.de>
-Cc: Uwe KleineK <ukleinek@strlen.de>, LKML <linux-kernel@vger.kernel.org>
-Message-ID: <20080918210306.GC2991@local>
-Content-Disposition: inline
-
-
-The generic UIO platform device driver should be given a unique driver ID and
-not just "uio". This is especially important since we now have a similar driver
-named uio_pdrv_genirq. Currently, there's no user of this driver in the
-mainline kernel.
-
-Signed-off-by: Hans J. Koch <hjk@linutronix.de>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/uio/uio_pdrv.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/uio/uio_pdrv.c
-+++ b/drivers/uio/uio_pdrv.c
-@@ -12,7 +12,7 @@
- #include <linux/uio_driver.h>
- #include <linux/stringify.h>
-
--#define DRIVER_NAME "uio"
-+#define DRIVER_NAME "uio_pdrv"
-
- struct uio_platdata {
- struct uio_info *uioinfo;
diff --git a/driver-core/uio-fix-mapping-of-logical-and-virtual-memory.patch b/driver-core/uio-fix-mapping-of-logical-and-virtual-memory.patch
deleted file mode 100644
index 4853ec84a7ea1a..00000000000000
--- a/driver-core/uio-fix-mapping-of-logical-and-virtual-memory.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From hjk@linutronix.de Wed Oct 1 14:01:23 2008
-From: Andrew Harvey <agh@cisco.com>
-Date: Wed, 24 Sep 2008 01:10:02 +0200
-Subject: UIO: Fix mapping of logical and virtual memory
-To: LKML <linux-kernel@vger.kernel.org>
-Cc: Greg KH <gregkh@suse.de>, "Andrew G. Harvey" <agh@cisco.com>
-Message-ID: <20080923230959.GB4066@local>
-Content-Disposition: inline
-
-From: "Andrew G. Harvey" <agh@cisco.com>
-
-mmap() doesn't work as expected for UIO_MEM_LOGICAL or UIO_MEM_VIRTUAL
-mappings. The offset into the memory needs to be added, otherwise
-uio_vma_fault always returns the first page only. Note that for UIO
-userspace calls mmap() with offset = N * getpagesize() to access
-mapping N. This must be compensated when calculating the offset. A
-comment was added to explain this since it is not obvious.
-
-Signed-off-by: Andrew G. Harvey <agh@cisco.com>
-Signed-off-by: Hans J. Koch <hjk@linutronix.de>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/uio/uio.c | 12 ++++++++++--
- 1 file changed, 10 insertions(+), 2 deletions(-)
-
---- a/drivers/uio/uio.c
-+++ b/drivers/uio/uio.c
-@@ -490,15 +490,23 @@ static int uio_vma_fault(struct vm_area_
- {
- struct uio_device *idev = vma->vm_private_data;
- struct page *page;
-+ unsigned long offset;
-
- int mi = uio_find_mem_index(vma);
- if (mi < 0)
- return VM_FAULT_SIGBUS;
-
-+ /*
-+ * We need to subtract mi because userspace uses offset = N*PAGE_SIZE
-+ * to use mem[N].
-+ */
-+ offset = (vmf->pgoff - mi) << PAGE_SHIFT;
-+
- if (idev->info->mem[mi].memtype == UIO_MEM_LOGICAL)
-- page = virt_to_page(idev->info->mem[mi].addr);
-+ page = virt_to_page(idev->info->mem[mi].addr + offset);
- else
-- page = vmalloc_to_page((void*)idev->info->mem[mi].addr);
-+ page = vmalloc_to_page((void *)idev->info->mem[mi].addr
-+ + offset);
- get_page(page);
- vmf->page = page;
- return 0;
diff --git a/driver-core/usb-gadget-link-fixes-for-cdc-composite-gadget.patch b/driver-core/usb-gadget-link-fixes-for-cdc-composite-gadget.patch
deleted file mode 100644
index 903a00913ae23e..00000000000000
--- a/driver-core/usb-gadget-link-fixes-for-cdc-composite-gadget.patch
+++ /dev/null
@@ -1,106 +0,0 @@
-From david-b@pacbell.net Wed Aug 20 13:18:56 2008
-From: David Brownell <david-b@pacbell.net>
-Date: Mon, 18 Aug 2008 17:43:56 -0700
-Subject: usb gadget: link fixes for cdc composite gadget
-To: Greg KH <greg@kroah.com>
-Cc: linux-usb@vger.kernel.org
-Message-ID: <200808181743.56228.david-b@pacbell.net>
-Content-Disposition: inline
-
-
-From: David Brownell <dbrownell@users.sourceforge.net>
-
-Change how the CDC Composite gadget driver builds: don't
-use separate compilation, since it works poorly when key
-parts are library code (with init sections etc). Instead
-be as close as we can to "gcc --combine ...".
-
-Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/usb/gadget/Makefile | 3 +--
- drivers/usb/gadget/cdc2.c | 25 +++++++++++++++++++++++--
- drivers/usb/gadget/u_ether.c | 4 ++--
- 3 files changed, 26 insertions(+), 6 deletions(-)
-
---- a/drivers/usb/gadget/cdc2.c
-+++ b/drivers/usb/gadget/cdc2.c
-@@ -43,6 +43,25 @@
-
- /*-------------------------------------------------------------------------*/
-
-+/*
-+ * Kbuild is not very cooperative with respect to linking separately
-+ * compiled library objects into one module. So for now we won't use
-+ * separate compilation ... ensuring init/exit sections work to shrink
-+ * the runtime footprint, and giving us at least some parts of what
-+ * a "gcc --combine ... part1.c part2.c part3.c ... " build would.
-+ */
-+
-+#include "composite.c"
-+#include "usbstring.c"
-+#include "config.c"
-+#include "epautoconf.c"
-+#include "u_serial.c"
-+#include "f_acm.c"
-+#include "f_ecm.c"
-+#include "u_ether.c"
-+
-+/*-------------------------------------------------------------------------*/
-+
- static struct usb_device_descriptor device_desc = {
- .bLength = sizeof device_desc,
- .bDescriptorType = USB_DT_DEVICE,
-@@ -148,7 +167,8 @@ static int __init cdc_bind(struct usb_co
- int status;
-
- if (!can_support_ecm(cdev->gadget)) {
-- ERROR(cdev, "controller '%s' not usable\n", gadget->name);
-+ dev_err(&gadget->dev, "controller '%s' not usable\n",
-+ gadget->name);
- return -EINVAL;
- }
-
-@@ -203,7 +223,8 @@ static int __init cdc_bind(struct usb_co
- if (status < 0)
- goto fail1;
-
-- INFO(cdev, "%s, version: " DRIVER_VERSION "\n", DRIVER_DESC);
-+ dev_info(&gadget->dev, "%s, version: " DRIVER_VERSION "\n",
-+ DRIVER_DESC);
-
- return 0;
-
---- a/drivers/usb/gadget/Makefile
-+++ b/drivers/usb/gadget/Makefile
-@@ -31,8 +31,7 @@ g_midi-objs := gmidi.o
- gadgetfs-objs := inode.o
- g_file_storage-objs := file_storage.o
- g_printer-objs := printer.o
--g_cdc-objs := cdc2.o u_ether.o f_ecm.o \
-- u_serial.o f_acm.o $(C_UTILS)
-+g_cdc-objs := cdc2.o
-
- ifeq ($(CONFIG_USB_ETH_RNDIS),y)
- g_ether-objs += f_rndis.o rndis.o
---- a/drivers/usb/gadget/u_ether.c
-+++ b/drivers/usb/gadget/u_ether.c
-@@ -52,7 +52,7 @@
- * this single "physical" link to be used by multiple virtual links.)
- */
-
--#define DRIVER_VERSION "29-May-2008"
-+#define UETH__VERSION "29-May-2008"
-
- struct eth_dev {
- /* lock is held while accessing port_usb
-@@ -170,7 +170,7 @@ static void eth_get_drvinfo(struct net_d
- struct eth_dev *dev = netdev_priv(net);
-
- strlcpy(p->driver, "g_ether", sizeof p->driver);
-- strlcpy(p->version, DRIVER_VERSION, sizeof p->version);
-+ strlcpy(p->version, UETH__VERSION, sizeof p->version);
- strlcpy(p->fw_version, dev->gadget->name, sizeof p->fw_version);
- strlcpy(p->bus_info, dev_name(&dev->gadget->dev), sizeof p->bus_info);
- }
diff --git a/driver-core/usb-gadget-link-fixes-for-gadget-zero.patch b/driver-core/usb-gadget-link-fixes-for-gadget-zero.patch
deleted file mode 100644
index e0a7b17a09d040..00000000000000
--- a/driver-core/usb-gadget-link-fixes-for-gadget-zero.patch
+++ /dev/null
@@ -1,166 +0,0 @@
-From david-b@pacbell.net Wed Aug 20 13:17:09 2008
-From: David Brownell <david-b@pacbell.net>
-Date: Mon, 18 Aug 2008 17:41:31 -0700
-Subject: usb gadget: link fixes for gadget zero
-To: Greg KH <greg@kroah.com>
-Cc: linux-usb@vger.kernel.org
-Message-ID: <200808181741.31169.david-b@pacbell.net>
-Content-Disposition: inline
-
-
-From: David Brownell <dbrownell@users.sourceforge.net>
-
-Change how the Gadget Zero driver builds: don't use
-separate compilation, since it works poorly when key
-parts are library code (with init sections etc).
-Instead be as close as we can to "gcc --combine ...".
-
-Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/usb/gadget/Makefile | 2 +-
- drivers/usb/gadget/f_loopback.c | 34 ++++++++++++++++++----------------
- drivers/usb/gadget/zero.c | 17 +++++++++++++++++
- 3 files changed, 36 insertions(+), 17 deletions(-)
-
---- a/drivers/usb/gadget/f_loopback.c
-+++ b/drivers/usb/gadget/f_loopback.c
-@@ -70,7 +70,7 @@ static struct usb_interface_descriptor l
-
- /* full speed support: */
-
--static struct usb_endpoint_descriptor fs_source_desc = {
-+static struct usb_endpoint_descriptor fs_loop_source_desc = {
- .bLength = USB_DT_ENDPOINT_SIZE,
- .bDescriptorType = USB_DT_ENDPOINT,
-
-@@ -78,7 +78,7 @@ static struct usb_endpoint_descriptor fs
- .bmAttributes = USB_ENDPOINT_XFER_BULK,
- };
-
--static struct usb_endpoint_descriptor fs_sink_desc = {
-+static struct usb_endpoint_descriptor fs_loop_sink_desc = {
- .bLength = USB_DT_ENDPOINT_SIZE,
- .bDescriptorType = USB_DT_ENDPOINT,
-
-@@ -88,14 +88,14 @@ static struct usb_endpoint_descriptor fs
-
- static struct usb_descriptor_header *fs_loopback_descs[] = {
- (struct usb_descriptor_header *) &loopback_intf,
-- (struct usb_descriptor_header *) &fs_sink_desc,
-- (struct usb_descriptor_header *) &fs_source_desc,
-+ (struct usb_descriptor_header *) &fs_loop_sink_desc,
-+ (struct usb_descriptor_header *) &fs_loop_source_desc,
- NULL,
- };
-
- /* high speed support: */
-
--static struct usb_endpoint_descriptor hs_source_desc = {
-+static struct usb_endpoint_descriptor hs_loop_source_desc = {
- .bLength = USB_DT_ENDPOINT_SIZE,
- .bDescriptorType = USB_DT_ENDPOINT,
-
-@@ -103,7 +103,7 @@ static struct usb_endpoint_descriptor hs
- .wMaxPacketSize = __constant_cpu_to_le16(512),
- };
-
--static struct usb_endpoint_descriptor hs_sink_desc = {
-+static struct usb_endpoint_descriptor hs_loop_sink_desc = {
- .bLength = USB_DT_ENDPOINT_SIZE,
- .bDescriptorType = USB_DT_ENDPOINT,
-
-@@ -113,8 +113,8 @@ static struct usb_endpoint_descriptor hs
-
- static struct usb_descriptor_header *hs_loopback_descs[] = {
- (struct usb_descriptor_header *) &loopback_intf,
-- (struct usb_descriptor_header *) &hs_source_desc,
-- (struct usb_descriptor_header *) &hs_sink_desc,
-+ (struct usb_descriptor_header *) &hs_loop_source_desc,
-+ (struct usb_descriptor_header *) &hs_loop_sink_desc,
- NULL,
- };
-
-@@ -152,7 +152,7 @@ loopback_bind(struct usb_configuration *
-
- /* allocate endpoints */
-
-- loop->in_ep = usb_ep_autoconfig(cdev->gadget, &fs_source_desc);
-+ loop->in_ep = usb_ep_autoconfig(cdev->gadget, &fs_loop_source_desc);
- if (!loop->in_ep) {
- autoconf_fail:
- ERROR(cdev, "%s: can't autoconfigure on %s\n",
-@@ -161,17 +161,17 @@ autoconf_fail:
- }
- loop->in_ep->driver_data = cdev; /* claim */
-
-- loop->out_ep = usb_ep_autoconfig(cdev->gadget, &fs_sink_desc);
-+ loop->out_ep = usb_ep_autoconfig(cdev->gadget, &fs_loop_sink_desc);
- if (!loop->out_ep)
- goto autoconf_fail;
- loop->out_ep->driver_data = cdev; /* claim */
-
- /* support high speed hardware */
- if (gadget_is_dualspeed(c->cdev->gadget)) {
-- hs_source_desc.bEndpointAddress =
-- fs_source_desc.bEndpointAddress;
-- hs_sink_desc.bEndpointAddress =
-- fs_sink_desc.bEndpointAddress;
-+ hs_loop_source_desc.bEndpointAddress =
-+ fs_loop_source_desc.bEndpointAddress;
-+ hs_loop_sink_desc.bEndpointAddress =
-+ fs_loop_sink_desc.bEndpointAddress;
- f->hs_descriptors = hs_loopback_descs;
- }
-
-@@ -255,8 +255,10 @@ enable_loopback(struct usb_composite_dev
- struct usb_request *req;
- unsigned i;
-
-- src = ep_choose(cdev->gadget, &hs_source_desc, &fs_source_desc);
-- sink = ep_choose(cdev->gadget, &hs_sink_desc, &fs_sink_desc);
-+ src = ep_choose(cdev->gadget,
-+ &hs_loop_source_desc, &fs_loop_source_desc);
-+ sink = ep_choose(cdev->gadget,
-+ &hs_loop_sink_desc, &fs_loop_sink_desc);
-
- /* one endpoint writes data back IN to the host */
- ep = loop->in_ep;
---- a/drivers/usb/gadget/Makefile
-+++ b/drivers/usb/gadget/Makefile
-@@ -24,7 +24,7 @@ obj-$(CONFIG_USB_M66592) += m66592-udc.o
- #
- C_UTILS = composite.o usbstring.o config.o epautoconf.o
-
--g_zero-objs := zero.o f_sourcesink.o f_loopback.o $(C_UTILS)
-+g_zero-objs := zero.o
- g_ether-objs := ether.o u_ether.o f_subset.o f_ecm.o $(C_UTILS)
- g_serial-objs := serial.o
- g_midi-objs := gmidi.o usbstring.o config.o epautoconf.o
---- a/drivers/usb/gadget/zero.c
-+++ b/drivers/usb/gadget/zero.c
-@@ -59,6 +59,23 @@
-
- /*-------------------------------------------------------------------------*/
-
-+/*
-+ * Kbuild is not very cooperative with respect to linking separately
-+ * compiled library objects into one module. So for now we won't use
-+ * separate compilation ... ensuring init/exit sections work to shrink
-+ * the runtime footprint, and giving us at least some parts of what
-+ * a "gcc --combine ... part1.c part2.c part3.c ... " build would.
-+ */
-+#include "composite.c"
-+#include "usbstring.c"
-+#include "config.c"
-+#include "epautoconf.c"
-+
-+#include "f_sourcesink.c"
-+#include "f_loopback.c"
-+
-+/*-------------------------------------------------------------------------*/
-+
- #define DRIVER_VERSION "Cinco de Mayo 2008"
-
- static const char longname[] = "Gadget Zero";
diff --git a/driver-core/usb-gadget-link-fixes-for-midi-gadget.patch b/driver-core/usb-gadget-link-fixes-for-midi-gadget.patch
deleted file mode 100644
index 13c504499e18cf..00000000000000
--- a/driver-core/usb-gadget-link-fixes-for-midi-gadget.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From david-b@pacbell.net Wed Aug 20 13:17:44 2008
-From: David Brownell <david-b@pacbell.net>
-Date: Mon, 18 Aug 2008 17:42:04 -0700
-Subject: usb gadget: link fixes for MIDI gadget
-To: Greg KH <greg@kroah.com>
-Cc: linux-usb@vger.kernel.org
-Message-ID: <200808181742.04452.david-b@pacbell.net>
-Content-Disposition: inline
-
-
-From: David Brownell <dbrownell@users.sourceforge.net>
-
-Change how the MIDI gadget driver builds: don't use separate
-compilation, since it works poorly when key parts are library
-code (with init sections etc). Instead be as close as we can
-to "gcc --combine ...".
-
-Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/usb/gadget/Makefile | 2 +-
- drivers/usb/gadget/gmidi.c | 15 +++++++++++++++
- 2 files changed, 16 insertions(+), 1 deletion(-)
-
---- a/drivers/usb/gadget/gmidi.c
-+++ b/drivers/usb/gadget/gmidi.c
-@@ -35,6 +35,21 @@
-
- #include "gadget_chips.h"
-
-+
-+/*
-+ * Kbuild is not very cooperative with respect to linking separately
-+ * compiled library objects into one module. So for now we won't use
-+ * separate compilation ... ensuring init/exit sections work to shrink
-+ * the runtime footprint, and giving us at least some parts of what
-+ * a "gcc --combine ... part1.c part2.c part3.c ... " build would.
-+ */
-+#include "usbstring.c"
-+#include "config.c"
-+#include "epautoconf.c"
-+
-+/*-------------------------------------------------------------------------*/
-+
-+
- MODULE_AUTHOR("Ben Williamson");
- MODULE_LICENSE("GPL v2");
-
---- a/drivers/usb/gadget/Makefile
-+++ b/drivers/usb/gadget/Makefile
-@@ -27,7 +27,7 @@ C_UTILS = composite.o usbstring.o config
- g_zero-objs := zero.o
- g_ether-objs := ether.o u_ether.o f_subset.o f_ecm.o $(C_UTILS)
- g_serial-objs := serial.o
--g_midi-objs := gmidi.o usbstring.o config.o epautoconf.o
-+g_midi-objs := gmidi.o
- gadgetfs-objs := inode.o
- g_file_storage-objs := file_storage.o usbstring.o config.o \
- epautoconf.o
diff --git a/driver-core/usb-gadget-link-fixes-for-network-gadget.patch b/driver-core/usb-gadget-link-fixes-for-network-gadget.patch
deleted file mode 100644
index 06f70280164687..00000000000000
--- a/driver-core/usb-gadget-link-fixes-for-network-gadget.patch
+++ /dev/null
@@ -1,969 +0,0 @@
-From david-b@pacbell.net Wed Aug 20 13:19:16 2008
-From: David Brownell <david-b@pacbell.net>
-Date: Mon, 18 Aug 2008 17:45:07 -0700
-Subject: usb gadget: link fixes for network gadget
-To: Greg KH <greg@kroah.com>
-Cc: linux-usb@vger.kernel.org
-Message-ID: <200808181745.07715.david-b@pacbell.net>
-Content-Disposition: inline
-
-
-From: David Brownell <dbrownell@users.sourceforge.net>
-
-Change how the Ethernet/RNDIS gadget driver builds: don't
-use separate compilation, since it works poorly when key
-parts are library code (with init sections etc). Instead
-be as close as we can to "gcc --combine ...".
-
-This is a bit more complicated than most of the others
-because it had to resolve a few symbol collisions.
-
-Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/usb/gadget/Makefile | 8 --
- drivers/usb/gadget/ether.c | 28 +++++++++-
- drivers/usb/gadget/f_ecm.c | 108 +++++++++++++++++++--------------------
- drivers/usb/gadget/f_subset.c | 44 ++++++++--------
- drivers/usb/gadget/rndis.c | 115 ++++++++++++++++++++----------------------
- 5 files changed, 158 insertions(+), 145 deletions(-)
-
---- a/drivers/usb/gadget/ether.c
-+++ b/drivers/usb/gadget/ether.c
-@@ -96,6 +96,28 @@ static inline bool has_rndis(void)
-
- /*-------------------------------------------------------------------------*/
-
-+/*
-+ * Kbuild is not very cooperative with respect to linking separately
-+ * compiled library objects into one module. So for now we won't use
-+ * separate compilation ... ensuring init/exit sections work to shrink
-+ * the runtime footprint, and giving us at least some parts of what
-+ * a "gcc --combine ... part1.c part2.c part3.c ... " build would.
-+ */
-+#include "composite.c"
-+#include "usbstring.c"
-+#include "config.c"
-+#include "epautoconf.c"
-+
-+#include "f_ecm.c"
-+#include "f_subset.c"
-+#ifdef CONFIG_USB_ETH_RNDIS
-+#include "f_rndis.c"
-+#include "rndis.c"
-+#endif
-+#include "u_ether.c"
-+
-+/*-------------------------------------------------------------------------*/
-+
- /* DO NOT REUSE THESE IDs with a protocol-incompatible driver!! Ever!!
- * Instead: allocate your own, using normal USB-IF procedures.
- */
-@@ -293,7 +315,8 @@ static int __init eth_bind(struct usb_co
- * but if the controller isn't recognized at all then
- * that assumption is a bit more likely to be wrong.
- */
-- WARNING(cdev, "controller '%s' not recognized; trying %s\n",
-+ dev_warn(&gadget->dev,
-+ "controller '%s' not recognized; trying %s\n",
- gadget->name,
- eth_config_driver.label);
- device_desc.bcdDevice =
-@@ -332,7 +355,8 @@ static int __init eth_bind(struct usb_co
- if (status < 0)
- goto fail;
-
-- INFO(cdev, "%s, version: " DRIVER_VERSION "\n", DRIVER_DESC);
-+ dev_info(&gadget->dev, "%s, version: " DRIVER_VERSION "\n",
-+ DRIVER_DESC);
-
- return 0;
-
---- a/drivers/usb/gadget/f_ecm.c
-+++ b/drivers/usb/gadget/f_ecm.c
-@@ -83,7 +83,7 @@ static inline struct f_ecm *func_to_ecm(
- }
-
- /* peak (theoretical) bulk transfer rate in bits-per-second */
--static inline unsigned bitrate(struct usb_gadget *g)
-+static inline unsigned ecm_bitrate(struct usb_gadget *g)
- {
- if (gadget_is_dualspeed(g) && g->speed == USB_SPEED_HIGH)
- return 13 * 512 * 8 * 1000 * 8;
-@@ -107,7 +107,7 @@ static inline unsigned bitrate(struct us
- */
-
- #define LOG2_STATUS_INTERVAL_MSEC 5 /* 1 << 5 == 32 msec */
--#define STATUS_BYTECOUNT 16 /* 8 byte header + data */
-+#define ECM_STATUS_BYTECOUNT 16 /* 8 byte header + data */
-
-
- /* interface descriptor: */
-@@ -125,8 +125,8 @@ static struct usb_interface_descriptor e
- /* .iInterface = DYNAMIC */
- };
-
--static struct usb_cdc_header_desc header_desc __initdata = {
-- .bLength = sizeof header_desc,
-+static struct usb_cdc_header_desc ecm_header_desc __initdata = {
-+ .bLength = sizeof ecm_header_desc,
- .bDescriptorType = USB_DT_CS_INTERFACE,
- .bDescriptorSubType = USB_CDC_HEADER_TYPE,
-
-@@ -141,8 +141,8 @@ static struct usb_cdc_union_desc ecm_uni
- /* .bSlaveInterface0 = DYNAMIC */
- };
-
--static struct usb_cdc_ether_desc ether_desc __initdata = {
-- .bLength = sizeof ether_desc,
-+static struct usb_cdc_ether_desc ecm_desc __initdata = {
-+ .bLength = sizeof ecm_desc,
- .bDescriptorType = USB_DT_CS_INTERFACE,
- .bDescriptorSubType = USB_CDC_ETHERNET_TYPE,
-
-@@ -186,17 +186,17 @@ static struct usb_interface_descriptor e
-
- /* full speed support: */
-
--static struct usb_endpoint_descriptor fs_notify_desc __initdata = {
-+static struct usb_endpoint_descriptor fs_ecm_notify_desc __initdata = {
- .bLength = USB_DT_ENDPOINT_SIZE,
- .bDescriptorType = USB_DT_ENDPOINT,
-
- .bEndpointAddress = USB_DIR_IN,
- .bmAttributes = USB_ENDPOINT_XFER_INT,
-- .wMaxPacketSize = __constant_cpu_to_le16(STATUS_BYTECOUNT),
-+ .wMaxPacketSize = __constant_cpu_to_le16(ECM_STATUS_BYTECOUNT),
- .bInterval = 1 << LOG2_STATUS_INTERVAL_MSEC,
- };
-
--static struct usb_endpoint_descriptor fs_in_desc __initdata = {
-+static struct usb_endpoint_descriptor fs_ecm_in_desc __initdata = {
- .bLength = USB_DT_ENDPOINT_SIZE,
- .bDescriptorType = USB_DT_ENDPOINT,
-
-@@ -204,7 +204,7 @@ static struct usb_endpoint_descriptor fs
- .bmAttributes = USB_ENDPOINT_XFER_BULK,
- };
-
--static struct usb_endpoint_descriptor fs_out_desc __initdata = {
-+static struct usb_endpoint_descriptor fs_ecm_out_desc __initdata = {
- .bLength = USB_DT_ENDPOINT_SIZE,
- .bDescriptorType = USB_DT_ENDPOINT,
-
-@@ -212,34 +212,34 @@ static struct usb_endpoint_descriptor fs
- .bmAttributes = USB_ENDPOINT_XFER_BULK,
- };
-
--static struct usb_descriptor_header *eth_fs_function[] __initdata = {
-+static struct usb_descriptor_header *ecm_fs_function[] __initdata = {
- /* CDC ECM control descriptors */
- (struct usb_descriptor_header *) &ecm_control_intf,
-- (struct usb_descriptor_header *) &header_desc,
-+ (struct usb_descriptor_header *) &ecm_header_desc,
- (struct usb_descriptor_header *) &ecm_union_desc,
-- (struct usb_descriptor_header *) &ether_desc,
-+ (struct usb_descriptor_header *) &ecm_desc,
- /* NOTE: status endpoint might need to be removed */
-- (struct usb_descriptor_header *) &fs_notify_desc,
-+ (struct usb_descriptor_header *) &fs_ecm_notify_desc,
- /* data interface, altsettings 0 and 1 */
- (struct usb_descriptor_header *) &ecm_data_nop_intf,
- (struct usb_descriptor_header *) &ecm_data_intf,
-- (struct usb_descriptor_header *) &fs_in_desc,
-- (struct usb_descriptor_header *) &fs_out_desc,
-+ (struct usb_descriptor_header *) &fs_ecm_in_desc,
-+ (struct usb_descriptor_header *) &fs_ecm_out_desc,
- NULL,
- };
-
- /* high speed support: */
-
--static struct usb_endpoint_descriptor hs_notify_desc __initdata = {
-+static struct usb_endpoint_descriptor hs_ecm_notify_desc __initdata = {
- .bLength = USB_DT_ENDPOINT_SIZE,
- .bDescriptorType = USB_DT_ENDPOINT,
-
- .bEndpointAddress = USB_DIR_IN,
- .bmAttributes = USB_ENDPOINT_XFER_INT,
-- .wMaxPacketSize = __constant_cpu_to_le16(STATUS_BYTECOUNT),
-+ .wMaxPacketSize = __constant_cpu_to_le16(ECM_STATUS_BYTECOUNT),
- .bInterval = LOG2_STATUS_INTERVAL_MSEC + 4,
- };
--static struct usb_endpoint_descriptor hs_in_desc __initdata = {
-+static struct usb_endpoint_descriptor hs_ecm_in_desc __initdata = {
- .bLength = USB_DT_ENDPOINT_SIZE,
- .bDescriptorType = USB_DT_ENDPOINT,
-
-@@ -248,7 +248,7 @@ static struct usb_endpoint_descriptor hs
- .wMaxPacketSize = __constant_cpu_to_le16(512),
- };
-
--static struct usb_endpoint_descriptor hs_out_desc __initdata = {
-+static struct usb_endpoint_descriptor hs_ecm_out_desc __initdata = {
- .bLength = USB_DT_ENDPOINT_SIZE,
- .bDescriptorType = USB_DT_ENDPOINT,
-
-@@ -257,19 +257,19 @@ static struct usb_endpoint_descriptor hs
- .wMaxPacketSize = __constant_cpu_to_le16(512),
- };
-
--static struct usb_descriptor_header *eth_hs_function[] __initdata = {
-+static struct usb_descriptor_header *ecm_hs_function[] __initdata = {
- /* CDC ECM control descriptors */
- (struct usb_descriptor_header *) &ecm_control_intf,
-- (struct usb_descriptor_header *) &header_desc,
-+ (struct usb_descriptor_header *) &ecm_header_desc,
- (struct usb_descriptor_header *) &ecm_union_desc,
-- (struct usb_descriptor_header *) &ether_desc,
-+ (struct usb_descriptor_header *) &ecm_desc,
- /* NOTE: status endpoint might need to be removed */
-- (struct usb_descriptor_header *) &hs_notify_desc,
-+ (struct usb_descriptor_header *) &hs_ecm_notify_desc,
- /* data interface, altsettings 0 and 1 */
- (struct usb_descriptor_header *) &ecm_data_nop_intf,
- (struct usb_descriptor_header *) &ecm_data_intf,
-- (struct usb_descriptor_header *) &hs_in_desc,
-- (struct usb_descriptor_header *) &hs_out_desc,
-+ (struct usb_descriptor_header *) &hs_ecm_in_desc,
-+ (struct usb_descriptor_header *) &hs_ecm_out_desc,
- NULL,
- };
-
-@@ -329,14 +329,14 @@ static void ecm_do_notify(struct f_ecm *
- event->bNotificationType = USB_CDC_NOTIFY_SPEED_CHANGE;
- event->wValue = cpu_to_le16(0);
- event->wLength = cpu_to_le16(8);
-- req->length = STATUS_BYTECOUNT;
-+ req->length = ECM_STATUS_BYTECOUNT;
-
- /* SPEED_CHANGE data is up/down speeds in bits/sec */
- data = req->buf + sizeof *event;
-- data[0] = cpu_to_le32(bitrate(cdev->gadget));
-+ data[0] = cpu_to_le32(ecm_bitrate(cdev->gadget));
- data[1] = data[0];
-
-- DBG(cdev, "notify speed %d\n", bitrate(cdev->gadget));
-+ DBG(cdev, "notify speed %d\n", ecm_bitrate(cdev->gadget));
- ecm->notify_state = ECM_NOTIFY_NONE;
- break;
- }
-@@ -628,13 +628,13 @@ ecm_bind(struct usb_configuration *c, st
- status = -ENODEV;
-
- /* allocate instance-specific endpoints */
-- ep = usb_ep_autoconfig(cdev->gadget, &fs_in_desc);
-+ ep = usb_ep_autoconfig(cdev->gadget, &fs_ecm_in_desc);
- if (!ep)
- goto fail;
- ecm->port.in_ep = ep;
- ep->driver_data = cdev; /* claim */
-
-- ep = usb_ep_autoconfig(cdev->gadget, &fs_out_desc);
-+ ep = usb_ep_autoconfig(cdev->gadget, &fs_ecm_out_desc);
- if (!ep)
- goto fail;
- ecm->port.out_ep = ep;
-@@ -644,7 +644,7 @@ ecm_bind(struct usb_configuration *c, st
- * don't treat it that way. It's simpler, and some newer CDC
- * profiles (wireless handsets) no longer treat it as optional.
- */
-- ep = usb_ep_autoconfig(cdev->gadget, &fs_notify_desc);
-+ ep = usb_ep_autoconfig(cdev->gadget, &fs_ecm_notify_desc);
- if (!ep)
- goto fail;
- ecm->notify = ep;
-@@ -656,47 +656,47 @@ ecm_bind(struct usb_configuration *c, st
- ecm->notify_req = usb_ep_alloc_request(ep, GFP_KERNEL);
- if (!ecm->notify_req)
- goto fail;
-- ecm->notify_req->buf = kmalloc(STATUS_BYTECOUNT, GFP_KERNEL);
-+ ecm->notify_req->buf = kmalloc(ECM_STATUS_BYTECOUNT, GFP_KERNEL);
- if (!ecm->notify_req->buf)
- goto fail;
- ecm->notify_req->context = ecm;
- ecm->notify_req->complete = ecm_notify_complete;
-
- /* copy descriptors, and track endpoint copies */
-- f->descriptors = usb_copy_descriptors(eth_fs_function);
-+ f->descriptors = usb_copy_descriptors(ecm_fs_function);
- if (!f->descriptors)
- goto fail;
-
-- ecm->fs.in = usb_find_endpoint(eth_fs_function,
-- f->descriptors, &fs_in_desc);
-- ecm->fs.out = usb_find_endpoint(eth_fs_function,
-- f->descriptors, &fs_out_desc);
-- ecm->fs.notify = usb_find_endpoint(eth_fs_function,
-- f->descriptors, &fs_notify_desc);
-+ ecm->fs.in = usb_find_endpoint(ecm_fs_function,
-+ f->descriptors, &fs_ecm_in_desc);
-+ ecm->fs.out = usb_find_endpoint(ecm_fs_function,
-+ f->descriptors, &fs_ecm_out_desc);
-+ ecm->fs.notify = usb_find_endpoint(ecm_fs_function,
-+ f->descriptors, &fs_ecm_notify_desc);
-
- /* support all relevant hardware speeds... we expect that when
- * hardware is dual speed, all bulk-capable endpoints work at
- * both speeds
- */
- if (gadget_is_dualspeed(c->cdev->gadget)) {
-- hs_in_desc.bEndpointAddress =
-- fs_in_desc.bEndpointAddress;
-- hs_out_desc.bEndpointAddress =
-- fs_out_desc.bEndpointAddress;
-- hs_notify_desc.bEndpointAddress =
-- fs_notify_desc.bEndpointAddress;
-+ hs_ecm_in_desc.bEndpointAddress =
-+ fs_ecm_in_desc.bEndpointAddress;
-+ hs_ecm_out_desc.bEndpointAddress =
-+ fs_ecm_out_desc.bEndpointAddress;
-+ hs_ecm_notify_desc.bEndpointAddress =
-+ fs_ecm_notify_desc.bEndpointAddress;
-
- /* copy descriptors, and track endpoint copies */
-- f->hs_descriptors = usb_copy_descriptors(eth_hs_function);
-+ f->hs_descriptors = usb_copy_descriptors(ecm_hs_function);
- if (!f->hs_descriptors)
- goto fail;
-
-- ecm->hs.in = usb_find_endpoint(eth_hs_function,
-- f->hs_descriptors, &hs_in_desc);
-- ecm->hs.out = usb_find_endpoint(eth_hs_function,
-- f->hs_descriptors, &hs_out_desc);
-- ecm->hs.notify = usb_find_endpoint(eth_hs_function,
-- f->hs_descriptors, &hs_notify_desc);
-+ ecm->hs.in = usb_find_endpoint(ecm_hs_function,
-+ f->hs_descriptors, &hs_ecm_in_desc);
-+ ecm->hs.out = usb_find_endpoint(ecm_hs_function,
-+ f->hs_descriptors, &hs_ecm_out_desc);
-+ ecm->hs.notify = usb_find_endpoint(ecm_hs_function,
-+ f->hs_descriptors, &hs_ecm_notify_desc);
- }
-
- /* NOTE: all that is done without knowing or caring about
-@@ -795,7 +795,7 @@ int __init ecm_bind_config(struct usb_co
- if (status < 0)
- return status;
- ecm_string_defs[1].id = status;
-- ether_desc.iMACAddress = status;
-+ ecm_desc.iMACAddress = status;
- }
-
- /* allocate and initialize one new instance */
---- a/drivers/usb/gadget/f_subset.c
-+++ b/drivers/usb/gadget/f_subset.c
-@@ -103,8 +103,8 @@ static struct usb_interface_descriptor s
- /* .iInterface = DYNAMIC */
- };
-
--static struct usb_cdc_header_desc header_desc __initdata = {
-- .bLength = sizeof header_desc,
-+static struct usb_cdc_header_desc mdlm_header_desc __initdata = {
-+ .bLength = sizeof mdlm_header_desc,
- .bDescriptorType = USB_DT_CS_INTERFACE,
- .bDescriptorSubType = USB_CDC_HEADER_TYPE,
-
-@@ -152,7 +152,7 @@ static struct usb_cdc_ether_desc ether_d
-
- /* full speed support: */
-
--static struct usb_endpoint_descriptor fs_in_desc __initdata = {
-+static struct usb_endpoint_descriptor fs_subset_in_desc __initdata = {
- .bLength = USB_DT_ENDPOINT_SIZE,
- .bDescriptorType = USB_DT_ENDPOINT,
-
-@@ -160,7 +160,7 @@ static struct usb_endpoint_descriptor fs
- .bmAttributes = USB_ENDPOINT_XFER_BULK,
- };
-
--static struct usb_endpoint_descriptor fs_out_desc __initdata = {
-+static struct usb_endpoint_descriptor fs_subset_out_desc __initdata = {
- .bLength = USB_DT_ENDPOINT_SIZE,
- .bDescriptorType = USB_DT_ENDPOINT,
-
-@@ -170,18 +170,18 @@ static struct usb_endpoint_descriptor fs
-
- static struct usb_descriptor_header *fs_eth_function[] __initdata = {
- (struct usb_descriptor_header *) &subset_data_intf,
-- (struct usb_descriptor_header *) &header_desc,
-+ (struct usb_descriptor_header *) &mdlm_header_desc,
- (struct usb_descriptor_header *) &mdlm_desc,
- (struct usb_descriptor_header *) &mdlm_detail_desc,
- (struct usb_descriptor_header *) &ether_desc,
-- (struct usb_descriptor_header *) &fs_in_desc,
-- (struct usb_descriptor_header *) &fs_out_desc,
-+ (struct usb_descriptor_header *) &fs_subset_in_desc,
-+ (struct usb_descriptor_header *) &fs_subset_out_desc,
- NULL,
- };
-
- /* high speed support: */
-
--static struct usb_endpoint_descriptor hs_in_desc __initdata = {
-+static struct usb_endpoint_descriptor hs_subset_in_desc __initdata = {
- .bLength = USB_DT_ENDPOINT_SIZE,
- .bDescriptorType = USB_DT_ENDPOINT,
-
-@@ -189,7 +189,7 @@ static struct usb_endpoint_descriptor hs
- .wMaxPacketSize = __constant_cpu_to_le16(512),
- };
-
--static struct usb_endpoint_descriptor hs_out_desc __initdata = {
-+static struct usb_endpoint_descriptor hs_subset_out_desc __initdata = {
- .bLength = USB_DT_ENDPOINT_SIZE,
- .bDescriptorType = USB_DT_ENDPOINT,
-
-@@ -199,12 +199,12 @@ static struct usb_endpoint_descriptor hs
-
- static struct usb_descriptor_header *hs_eth_function[] __initdata = {
- (struct usb_descriptor_header *) &subset_data_intf,
-- (struct usb_descriptor_header *) &header_desc,
-+ (struct usb_descriptor_header *) &mdlm_header_desc,
- (struct usb_descriptor_header *) &mdlm_desc,
- (struct usb_descriptor_header *) &mdlm_detail_desc,
- (struct usb_descriptor_header *) &ether_desc,
-- (struct usb_descriptor_header *) &hs_in_desc,
-- (struct usb_descriptor_header *) &hs_out_desc,
-+ (struct usb_descriptor_header *) &hs_subset_in_desc,
-+ (struct usb_descriptor_header *) &hs_subset_out_desc,
- NULL,
- };
-
-@@ -281,13 +281,13 @@ geth_bind(struct usb_configuration *c, s
- status = -ENODEV;
-
- /* allocate instance-specific endpoints */
-- ep = usb_ep_autoconfig(cdev->gadget, &fs_in_desc);
-+ ep = usb_ep_autoconfig(cdev->gadget, &fs_subset_in_desc);
- if (!ep)
- goto fail;
- geth->port.in_ep = ep;
- ep->driver_data = cdev; /* claim */
-
-- ep = usb_ep_autoconfig(cdev->gadget, &fs_out_desc);
-+ ep = usb_ep_autoconfig(cdev->gadget, &fs_subset_out_desc);
- if (!ep)
- goto fail;
- geth->port.out_ep = ep;
-@@ -297,9 +297,9 @@ geth_bind(struct usb_configuration *c, s
- f->descriptors = usb_copy_descriptors(fs_eth_function);
-
- geth->fs.in = usb_find_endpoint(fs_eth_function,
-- f->descriptors, &fs_in_desc);
-+ f->descriptors, &fs_subset_in_desc);
- geth->fs.out = usb_find_endpoint(fs_eth_function,
-- f->descriptors, &fs_out_desc);
-+ f->descriptors, &fs_subset_out_desc);
-
-
- /* support all relevant hardware speeds... we expect that when
-@@ -307,18 +307,18 @@ geth_bind(struct usb_configuration *c, s
- * both speeds
- */
- if (gadget_is_dualspeed(c->cdev->gadget)) {
-- hs_in_desc.bEndpointAddress =
-- fs_in_desc.bEndpointAddress;
-- hs_out_desc.bEndpointAddress =
-- fs_out_desc.bEndpointAddress;
-+ hs_subset_in_desc.bEndpointAddress =
-+ fs_subset_in_desc.bEndpointAddress;
-+ hs_subset_out_desc.bEndpointAddress =
-+ fs_subset_out_desc.bEndpointAddress;
-
- /* copy descriptors, and track endpoint copies */
- f->hs_descriptors = usb_copy_descriptors(hs_eth_function);
-
- geth->hs.in = usb_find_endpoint(hs_eth_function,
-- f->hs_descriptors, &hs_in_desc);
-+ f->hs_descriptors, &hs_subset_in_desc);
- geth->hs.out = usb_find_endpoint(hs_eth_function,
-- f->hs_descriptors, &hs_out_desc);
-+ f->hs_descriptors, &hs_subset_out_desc);
- }
-
- /* NOTE: all that is done without knowing or caring about
---- a/drivers/usb/gadget/Makefile
-+++ b/drivers/usb/gadget/Makefile
-@@ -22,10 +22,8 @@ obj-$(CONFIG_USB_M66592) += m66592-udc.o
- #
- # USB gadget drivers
- #
--C_UTILS = composite.o usbstring.o config.o epautoconf.o
--
- g_zero-objs := zero.o
--g_ether-objs := ether.o u_ether.o f_subset.o f_ecm.o $(C_UTILS)
-+g_ether-objs := ether.o
- g_serial-objs := serial.o
- g_midi-objs := gmidi.o
- gadgetfs-objs := inode.o
-@@ -33,10 +31,6 @@ g_file_storage-objs := file_storage.o
- g_printer-objs := printer.o
- g_cdc-objs := cdc2.o
-
--ifeq ($(CONFIG_USB_ETH_RNDIS),y)
-- g_ether-objs += f_rndis.o rndis.o
--endif
--
- obj-$(CONFIG_USB_ZERO) += g_zero.o
- obj-$(CONFIG_USB_ETH) += g_ether.o
- obj-$(CONFIG_USB_GADGETFS) += gadgetfs.o
---- a/drivers/usb/gadget/rndis.c
-+++ b/drivers/usb/gadget/rndis.c
-@@ -57,11 +57,6 @@ MODULE_PARM_DESC (rndis_debug, "enable d
- #define rndis_debug 0
- #endif
-
--#define DBG(str,args...) do { \
-- if (rndis_debug) \
-- pr_debug(str , ## args); \
-- } while (0)
--
- #define RNDIS_MAX_CONFIGS 1
-
-
-@@ -183,9 +178,9 @@ gen_ndis_query_resp (int configNr, u32 O
- if (!resp) return -ENOMEM;
-
- if (buf_len && rndis_debug > 1) {
-- DBG("query OID %08x value, len %d:\n", OID, buf_len);
-+ pr_debug("query OID %08x value, len %d:\n", OID, buf_len);
- for (i = 0; i < buf_len; i += 16) {
-- DBG("%03d: %08x %08x %08x %08x\n", i,
-+ pr_debug("%03d: %08x %08x %08x %08x\n", i,
- get_unaligned_le32(&buf[i]),
- get_unaligned_le32(&buf[i + 4]),
- get_unaligned_le32(&buf[i + 8]),
-@@ -209,7 +204,7 @@ gen_ndis_query_resp (int configNr, u32 O
-
- /* mandatory */
- case OID_GEN_SUPPORTED_LIST:
-- DBG("%s: OID_GEN_SUPPORTED_LIST\n", __func__);
-+ pr_debug("%s: OID_GEN_SUPPORTED_LIST\n", __func__);
- length = sizeof (oid_supported_list);
- count = length / sizeof (u32);
- for (i = 0; i < count; i++)
-@@ -219,7 +214,7 @@ gen_ndis_query_resp (int configNr, u32 O
-
- /* mandatory */
- case OID_GEN_HARDWARE_STATUS:
-- DBG("%s: OID_GEN_HARDWARE_STATUS\n", __func__);
-+ pr_debug("%s: OID_GEN_HARDWARE_STATUS\n", __func__);
- /* Bogus question!
- * Hardware must be ready to receive high level protocols.
- * BTW:
-@@ -232,14 +227,14 @@ gen_ndis_query_resp (int configNr, u32 O
-
- /* mandatory */
- case OID_GEN_MEDIA_SUPPORTED:
-- DBG("%s: OID_GEN_MEDIA_SUPPORTED\n", __func__);
-+ pr_debug("%s: OID_GEN_MEDIA_SUPPORTED\n", __func__);
- *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr].medium);
- retval = 0;
- break;
-
- /* mandatory */
- case OID_GEN_MEDIA_IN_USE:
-- DBG("%s: OID_GEN_MEDIA_IN_USE\n", __func__);
-+ pr_debug("%s: OID_GEN_MEDIA_IN_USE\n", __func__);
- /* one medium, one transport... (maybe you do it better) */
- *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr].medium);
- retval = 0;
-@@ -247,7 +242,7 @@ gen_ndis_query_resp (int configNr, u32 O
-
- /* mandatory */
- case OID_GEN_MAXIMUM_FRAME_SIZE:
-- DBG("%s: OID_GEN_MAXIMUM_FRAME_SIZE\n", __func__);
-+ pr_debug("%s: OID_GEN_MAXIMUM_FRAME_SIZE\n", __func__);
- if (rndis_per_dev_params [configNr].dev) {
- *outbuf = cpu_to_le32 (
- rndis_per_dev_params [configNr].dev->mtu);
-@@ -258,7 +253,7 @@ gen_ndis_query_resp (int configNr, u32 O
- /* mandatory */
- case OID_GEN_LINK_SPEED:
- if (rndis_debug > 1)
-- DBG("%s: OID_GEN_LINK_SPEED\n", __func__);
-+ pr_debug("%s: OID_GEN_LINK_SPEED\n", __func__);
- if (rndis_per_dev_params [configNr].media_state
- == NDIS_MEDIA_STATE_DISCONNECTED)
- *outbuf = __constant_cpu_to_le32 (0);
-@@ -270,7 +265,7 @@ gen_ndis_query_resp (int configNr, u32 O
-
- /* mandatory */
- case OID_GEN_TRANSMIT_BLOCK_SIZE:
-- DBG("%s: OID_GEN_TRANSMIT_BLOCK_SIZE\n", __func__);
-+ pr_debug("%s: OID_GEN_TRANSMIT_BLOCK_SIZE\n", __func__);
- if (rndis_per_dev_params [configNr].dev) {
- *outbuf = cpu_to_le32 (
- rndis_per_dev_params [configNr].dev->mtu);
-@@ -280,7 +275,7 @@ gen_ndis_query_resp (int configNr, u32 O
-
- /* mandatory */
- case OID_GEN_RECEIVE_BLOCK_SIZE:
-- DBG("%s: OID_GEN_RECEIVE_BLOCK_SIZE\n", __func__);
-+ pr_debug("%s: OID_GEN_RECEIVE_BLOCK_SIZE\n", __func__);
- if (rndis_per_dev_params [configNr].dev) {
- *outbuf = cpu_to_le32 (
- rndis_per_dev_params [configNr].dev->mtu);
-@@ -290,7 +285,7 @@ gen_ndis_query_resp (int configNr, u32 O
-
- /* mandatory */
- case OID_GEN_VENDOR_ID:
-- DBG("%s: OID_GEN_VENDOR_ID\n", __func__);
-+ pr_debug("%s: OID_GEN_VENDOR_ID\n", __func__);
- *outbuf = cpu_to_le32 (
- rndis_per_dev_params [configNr].vendorID);
- retval = 0;
-@@ -298,7 +293,7 @@ gen_ndis_query_resp (int configNr, u32 O
-
- /* mandatory */
- case OID_GEN_VENDOR_DESCRIPTION:
-- DBG("%s: OID_GEN_VENDOR_DESCRIPTION\n", __func__);
-+ pr_debug("%s: OID_GEN_VENDOR_DESCRIPTION\n", __func__);
- length = strlen (rndis_per_dev_params [configNr].vendorDescr);
- memcpy (outbuf,
- rndis_per_dev_params [configNr].vendorDescr, length);
-@@ -306,7 +301,7 @@ gen_ndis_query_resp (int configNr, u32 O
- break;
-
- case OID_GEN_VENDOR_DRIVER_VERSION:
-- DBG("%s: OID_GEN_VENDOR_DRIVER_VERSION\n", __func__);
-+ pr_debug("%s: OID_GEN_VENDOR_DRIVER_VERSION\n", __func__);
- /* Created as LE */
- *outbuf = rndis_driver_version;
- retval = 0;
-@@ -314,14 +309,14 @@ gen_ndis_query_resp (int configNr, u32 O
-
- /* mandatory */
- case OID_GEN_CURRENT_PACKET_FILTER:
-- DBG("%s: OID_GEN_CURRENT_PACKET_FILTER\n", __func__);
-+ pr_debug("%s: OID_GEN_CURRENT_PACKET_FILTER\n", __func__);
- *outbuf = cpu_to_le32 (*rndis_per_dev_params[configNr].filter);
- retval = 0;
- break;
-
- /* mandatory */
- case OID_GEN_MAXIMUM_TOTAL_SIZE:
-- DBG("%s: OID_GEN_MAXIMUM_TOTAL_SIZE\n", __func__);
-+ pr_debug("%s: OID_GEN_MAXIMUM_TOTAL_SIZE\n", __func__);
- *outbuf = __constant_cpu_to_le32(RNDIS_MAX_TOTAL_SIZE);
- retval = 0;
- break;
-@@ -329,14 +324,14 @@ gen_ndis_query_resp (int configNr, u32 O
- /* mandatory */
- case OID_GEN_MEDIA_CONNECT_STATUS:
- if (rndis_debug > 1)
-- DBG("%s: OID_GEN_MEDIA_CONNECT_STATUS\n", __func__);
-+ pr_debug("%s: OID_GEN_MEDIA_CONNECT_STATUS\n", __func__);
- *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
- .media_state);
- retval = 0;
- break;
-
- case OID_GEN_PHYSICAL_MEDIUM:
-- DBG("%s: OID_GEN_PHYSICAL_MEDIUM\n", __func__);
-+ pr_debug("%s: OID_GEN_PHYSICAL_MEDIUM\n", __func__);
- *outbuf = __constant_cpu_to_le32 (0);
- retval = 0;
- break;
-@@ -346,7 +341,7 @@ gen_ndis_query_resp (int configNr, u32 O
- * versions emit undefined RNDIS messages. DOCUMENT ALL THESE!
- */
- case OID_GEN_MAC_OPTIONS: /* from WinME */
-- DBG("%s: OID_GEN_MAC_OPTIONS\n", __func__);
-+ pr_debug("%s: OID_GEN_MAC_OPTIONS\n", __func__);
- *outbuf = __constant_cpu_to_le32(
- NDIS_MAC_OPTION_RECEIVE_SERIALIZED
- | NDIS_MAC_OPTION_FULL_DUPLEX);
-@@ -358,7 +353,7 @@ gen_ndis_query_resp (int configNr, u32 O
- /* mandatory */
- case OID_GEN_XMIT_OK:
- if (rndis_debug > 1)
-- DBG("%s: OID_GEN_XMIT_OK\n", __func__);
-+ pr_debug("%s: OID_GEN_XMIT_OK\n", __func__);
- if (stats) {
- *outbuf = cpu_to_le32(stats->tx_packets
- - stats->tx_errors - stats->tx_dropped);
-@@ -369,7 +364,7 @@ gen_ndis_query_resp (int configNr, u32 O
- /* mandatory */
- case OID_GEN_RCV_OK:
- if (rndis_debug > 1)
-- DBG("%s: OID_GEN_RCV_OK\n", __func__);
-+ pr_debug("%s: OID_GEN_RCV_OK\n", __func__);
- if (stats) {
- *outbuf = cpu_to_le32(stats->rx_packets
- - stats->rx_errors - stats->rx_dropped);
-@@ -380,7 +375,7 @@ gen_ndis_query_resp (int configNr, u32 O
- /* mandatory */
- case OID_GEN_XMIT_ERROR:
- if (rndis_debug > 1)
-- DBG("%s: OID_GEN_XMIT_ERROR\n", __func__);
-+ pr_debug("%s: OID_GEN_XMIT_ERROR\n", __func__);
- if (stats) {
- *outbuf = cpu_to_le32(stats->tx_errors);
- retval = 0;
-@@ -390,7 +385,7 @@ gen_ndis_query_resp (int configNr, u32 O
- /* mandatory */
- case OID_GEN_RCV_ERROR:
- if (rndis_debug > 1)
-- DBG("%s: OID_GEN_RCV_ERROR\n", __func__);
-+ pr_debug("%s: OID_GEN_RCV_ERROR\n", __func__);
- if (stats) {
- *outbuf = cpu_to_le32(stats->rx_errors);
- retval = 0;
-@@ -399,7 +394,7 @@ gen_ndis_query_resp (int configNr, u32 O
-
- /* mandatory */
- case OID_GEN_RCV_NO_BUFFER:
-- DBG("%s: OID_GEN_RCV_NO_BUFFER\n", __func__);
-+ pr_debug("%s: OID_GEN_RCV_NO_BUFFER\n", __func__);
- if (stats) {
- *outbuf = cpu_to_le32(stats->rx_dropped);
- retval = 0;
-@@ -410,7 +405,7 @@ gen_ndis_query_resp (int configNr, u32 O
-
- /* mandatory */
- case OID_802_3_PERMANENT_ADDRESS:
-- DBG("%s: OID_802_3_PERMANENT_ADDRESS\n", __func__);
-+ pr_debug("%s: OID_802_3_PERMANENT_ADDRESS\n", __func__);
- if (rndis_per_dev_params [configNr].dev) {
- length = ETH_ALEN;
- memcpy (outbuf,
-@@ -422,7 +417,7 @@ gen_ndis_query_resp (int configNr, u32 O
-
- /* mandatory */
- case OID_802_3_CURRENT_ADDRESS:
-- DBG("%s: OID_802_3_CURRENT_ADDRESS\n", __func__);
-+ pr_debug("%s: OID_802_3_CURRENT_ADDRESS\n", __func__);
- if (rndis_per_dev_params [configNr].dev) {
- length = ETH_ALEN;
- memcpy (outbuf,
-@@ -434,7 +429,7 @@ gen_ndis_query_resp (int configNr, u32 O
-
- /* mandatory */
- case OID_802_3_MULTICAST_LIST:
-- DBG("%s: OID_802_3_MULTICAST_LIST\n", __func__);
-+ pr_debug("%s: OID_802_3_MULTICAST_LIST\n", __func__);
- /* Multicast base address only */
- *outbuf = __constant_cpu_to_le32 (0xE0000000);
- retval = 0;
-@@ -442,21 +437,21 @@ gen_ndis_query_resp (int configNr, u32 O
-
- /* mandatory */
- case OID_802_3_MAXIMUM_LIST_SIZE:
-- DBG("%s: OID_802_3_MAXIMUM_LIST_SIZE\n", __func__);
-+ pr_debug("%s: OID_802_3_MAXIMUM_LIST_SIZE\n", __func__);
- /* Multicast base address only */
- *outbuf = __constant_cpu_to_le32 (1);
- retval = 0;
- break;
-
- case OID_802_3_MAC_OPTIONS:
-- DBG("%s: OID_802_3_MAC_OPTIONS\n", __func__);
-+ pr_debug("%s: OID_802_3_MAC_OPTIONS\n", __func__);
- break;
-
- /* ieee802.3 statistics OIDs (table 4-4) */
-
- /* mandatory */
- case OID_802_3_RCV_ERROR_ALIGNMENT:
-- DBG("%s: OID_802_3_RCV_ERROR_ALIGNMENT\n", __func__);
-+ pr_debug("%s: OID_802_3_RCV_ERROR_ALIGNMENT\n", __func__);
- if (stats) {
- *outbuf = cpu_to_le32(stats->rx_frame_errors);
- retval = 0;
-@@ -465,14 +460,14 @@ gen_ndis_query_resp (int configNr, u32 O
-
- /* mandatory */
- case OID_802_3_XMIT_ONE_COLLISION:
-- DBG("%s: OID_802_3_XMIT_ONE_COLLISION\n", __func__);
-+ pr_debug("%s: OID_802_3_XMIT_ONE_COLLISION\n", __func__);
- *outbuf = __constant_cpu_to_le32 (0);
- retval = 0;
- break;
-
- /* mandatory */
- case OID_802_3_XMIT_MORE_COLLISIONS:
-- DBG("%s: OID_802_3_XMIT_MORE_COLLISIONS\n", __func__);
-+ pr_debug("%s: OID_802_3_XMIT_MORE_COLLISIONS\n", __func__);
- *outbuf = __constant_cpu_to_le32 (0);
- retval = 0;
- break;
-@@ -504,9 +499,9 @@ static int gen_ndis_set_resp (u8 configN
- return -ENOMEM;
-
- if (buf_len && rndis_debug > 1) {
-- DBG("set OID %08x value, len %d:\n", OID, buf_len);
-+ pr_debug("set OID %08x value, len %d:\n", OID, buf_len);
- for (i = 0; i < buf_len; i += 16) {
-- DBG("%03d: %08x %08x %08x %08x\n", i,
-+ pr_debug("%03d: %08x %08x %08x %08x\n", i,
- get_unaligned_le32(&buf[i]),
- get_unaligned_le32(&buf[i + 4]),
- get_unaligned_le32(&buf[i + 8]),
-@@ -525,7 +520,7 @@ static int gen_ndis_set_resp (u8 configN
- * MULTICAST, ALL_MULTICAST, BROADCAST
- */
- *params->filter = (u16)get_unaligned_le32(buf);
-- DBG("%s: OID_GEN_CURRENT_PACKET_FILTER %08x\n",
-+ pr_debug("%s: OID_GEN_CURRENT_PACKET_FILTER %08x\n",
- __func__, *params->filter);
-
- /* this call has a significant side effect: it's
-@@ -547,7 +542,7 @@ static int gen_ndis_set_resp (u8 configN
-
- case OID_802_3_MULTICAST_LIST:
- /* I think we can ignore this */
-- DBG("%s: OID_802_3_MULTICAST_LIST\n", __func__);
-+ pr_debug("%s: OID_802_3_MULTICAST_LIST\n", __func__);
- retval = 0;
- break;
-
-@@ -606,7 +601,7 @@ static int rndis_query_response (int con
- rndis_resp_t *r;
- struct rndis_params *params = rndis_per_dev_params + configNr;
-
-- // DBG("%s: OID = %08X\n", __func__, cpu_to_le32(buf->OID));
-+ // pr_debug("%s: OID = %08X\n", __func__, cpu_to_le32(buf->OID));
- if (!params->dev)
- return -ENOTSUPP;
-
-@@ -659,15 +654,15 @@ static int rndis_set_response (int confi
- BufOffset = le32_to_cpu (buf->InformationBufferOffset);
-
- #ifdef VERBOSE_DEBUG
-- DBG("%s: Length: %d\n", __func__, BufLength);
-- DBG("%s: Offset: %d\n", __func__, BufOffset);
-- DBG("%s: InfoBuffer: ", __func__);
-+ pr_debug("%s: Length: %d\n", __func__, BufLength);
-+ pr_debug("%s: Offset: %d\n", __func__, BufOffset);
-+ pr_debug("%s: InfoBuffer: ", __func__);
-
- for (i = 0; i < BufLength; i++) {
-- DBG("%02x ", *(((u8 *) buf) + i + 8 + BufOffset));
-+ pr_debug("%02x ", *(((u8 *) buf) + i + 8 + BufOffset));
- }
-
-- DBG("\n");
-+ pr_debug("\n");
- #endif
-
- resp->MessageType = __constant_cpu_to_le32 (REMOTE_NDIS_SET_CMPLT);
-@@ -821,14 +816,14 @@ int rndis_msg_parser (u8 configNr, u8 *b
- /* For USB: responses may take up to 10 seconds */
- switch (MsgType) {
- case REMOTE_NDIS_INITIALIZE_MSG:
-- DBG("%s: REMOTE_NDIS_INITIALIZE_MSG\n",
-+ pr_debug("%s: REMOTE_NDIS_INITIALIZE_MSG\n",
- __func__ );
- params->state = RNDIS_INITIALIZED;
- return rndis_init_response (configNr,
- (rndis_init_msg_type *) buf);
-
- case REMOTE_NDIS_HALT_MSG:
-- DBG("%s: REMOTE_NDIS_HALT_MSG\n",
-+ pr_debug("%s: REMOTE_NDIS_HALT_MSG\n",
- __func__ );
- params->state = RNDIS_UNINITIALIZED;
- if (params->dev) {
-@@ -846,7 +841,7 @@ int rndis_msg_parser (u8 configNr, u8 *b
- (rndis_set_msg_type *) buf);
-
- case REMOTE_NDIS_RESET_MSG:
-- DBG("%s: REMOTE_NDIS_RESET_MSG\n",
-+ pr_debug("%s: REMOTE_NDIS_RESET_MSG\n",
- __func__ );
- return rndis_reset_response (configNr,
- (rndis_reset_msg_type *) buf);
-@@ -854,7 +849,7 @@ int rndis_msg_parser (u8 configNr, u8 *b
- case REMOTE_NDIS_KEEPALIVE_MSG:
- /* For USB: host does this every 5 seconds */
- if (rndis_debug > 1)
-- DBG("%s: REMOTE_NDIS_KEEPALIVE_MSG\n",
-+ pr_debug("%s: REMOTE_NDIS_KEEPALIVE_MSG\n",
- __func__ );
- return rndis_keepalive_response (configNr,
- (rndis_keepalive_msg_type *)
-@@ -870,7 +865,7 @@ int rndis_msg_parser (u8 configNr, u8 *b
- {
- unsigned i;
- for (i = 0; i < MsgLength; i += 16) {
-- DBG("%03d: "
-+ pr_debug("%03d: "
- " %02x %02x %02x %02x"
- " %02x %02x %02x %02x"
- " %02x %02x %02x %02x"
-@@ -905,18 +900,18 @@ int rndis_register(void (*resp_avail)(vo
- rndis_per_dev_params [i].used = 1;
- rndis_per_dev_params [i].resp_avail = resp_avail;
- rndis_per_dev_params [i].v = v;
-- DBG("%s: configNr = %d\n", __func__, i);
-+ pr_debug("%s: configNr = %d\n", __func__, i);
- return i;
- }
- }
-- DBG("failed\n");
-+ pr_debug("failed\n");
-
- return -ENODEV;
- }
-
- void rndis_deregister (int configNr)
- {
-- DBG("%s: \n", __func__ );
-+ pr_debug("%s: \n", __func__ );
-
- if (configNr >= RNDIS_MAX_CONFIGS) return;
- rndis_per_dev_params [configNr].used = 0;
-@@ -926,7 +921,7 @@ void rndis_deregister (int configNr)
-
- int rndis_set_param_dev(u8 configNr, struct net_device *dev, u16 *cdc_filter)
- {
-- DBG("%s:\n", __func__ );
-+ pr_debug("%s:\n", __func__ );
- if (!dev)
- return -EINVAL;
- if (configNr >= RNDIS_MAX_CONFIGS) return -1;
-@@ -939,7 +934,7 @@ int rndis_set_param_dev(u8 configNr, str
-
- int rndis_set_param_vendor (u8 configNr, u32 vendorID, const char *vendorDescr)
- {
-- DBG("%s:\n", __func__ );
-+ pr_debug("%s:\n", __func__ );
- if (!vendorDescr) return -1;
- if (configNr >= RNDIS_MAX_CONFIGS) return -1;
-
-@@ -951,7 +946,7 @@ int rndis_set_param_vendor (u8 configNr,
-
- int rndis_set_param_medium (u8 configNr, u32 medium, u32 speed)
- {
-- DBG("%s: %u %u\n", __func__, medium, speed);
-+ pr_debug("%s: %u %u\n", __func__, medium, speed);
- if (configNr >= RNDIS_MAX_CONFIGS) return -1;
-
- rndis_per_dev_params [configNr].medium = medium;
-@@ -1114,7 +1109,7 @@ static ssize_t rndis_proc_write(struct f
- break;
- default:
- if (fl_speed) p->speed = speed;
-- else DBG("%c is not valid\n", c);
-+ else pr_debug("%c is not valid\n", c);
- break;
- }
-
-@@ -1159,12 +1154,12 @@ int __init rndis_init (void)
- &rndis_proc_fops,
- (void *)(rndis_per_dev_params + i))))
- {
-- DBG("%s :remove entries", __func__);
-+ pr_debug("%s :remove entries", __func__);
- while (i) {
- sprintf (name, NAME_TEMPLATE, --i);
- remove_proc_entry (name, NULL);
- }
-- DBG("\n");
-+ pr_debug("\n");
- return -EIO;
- }
- #endif
diff --git a/driver-core/usb-gadget-link-fixes-for-printer-gadget.patch b/driver-core/usb-gadget-link-fixes-for-printer-gadget.patch
deleted file mode 100644
index c2cc420c2839c6..00000000000000
--- a/driver-core/usb-gadget-link-fixes-for-printer-gadget.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From david-b@pacbell.net Wed Aug 20 13:18:07 2008
-From: David Brownell <david-b@pacbell.net>
-Date: Mon, 18 Aug 2008 17:42:49 -0700
-Subject: usb gadget: link fixes for printer gadget
-To: Greg KH <greg@kroah.com>
-Cc: linux-usb@vger.kernel.org
-Message-ID: <200808181742.49389.david-b@pacbell.net>
-Content-Disposition: inline
-
-
-From: David Brownell <dbrownell@users.sourceforge.net>
-
-Change how the printer gadget driver builds: don't use
-separate compilation, since it works poorly when key parts
-are library code (with init sections etc). Instead be as
-close as we can to "gcc --combine ...".
-
-Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/usb/gadget/Makefile | 3 +--
- drivers/usb/gadget/printer.c | 14 ++++++++++++++
- 2 files changed, 15 insertions(+), 2 deletions(-)
-
---- a/drivers/usb/gadget/Makefile
-+++ b/drivers/usb/gadget/Makefile
-@@ -31,8 +31,7 @@ g_midi-objs := gmidi.o
- gadgetfs-objs := inode.o
- g_file_storage-objs := file_storage.o usbstring.o config.o \
- epautoconf.o
--g_printer-objs := printer.o usbstring.o config.o \
-- epautoconf.o
-+g_printer-objs := printer.o
- g_cdc-objs := cdc2.o u_ether.o f_ecm.o \
- u_serial.o f_acm.o $(C_UTILS)
-
---- a/drivers/usb/gadget/printer.c
-+++ b/drivers/usb/gadget/printer.c
-@@ -53,6 +53,20 @@
-
- #include "gadget_chips.h"
-
-+
-+/*
-+ * Kbuild is not very cooperative with respect to linking separately
-+ * compiled library objects into one module. So for now we won't use
-+ * separate compilation ... ensuring init/exit sections work to shrink
-+ * the runtime footprint, and giving us at least some parts of what
-+ * a "gcc --combine ... part1.c part2.c part3.c ... " build would.
-+ */
-+#include "usbstring.c"
-+#include "config.c"
-+#include "epautoconf.c"
-+
-+/*-------------------------------------------------------------------------*/
-+
- #define DRIVER_DESC "Printer Gadget"
- #define DRIVER_VERSION "2007 OCT 06"
-
diff --git a/driver-core/usb-gadget-link-fixes-for-serial-gadget.patch b/driver-core/usb-gadget-link-fixes-for-serial-gadget.patch
deleted file mode 100644
index cea1a0bd822d73..00000000000000
--- a/driver-core/usb-gadget-link-fixes-for-serial-gadget.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From david-b@pacbell.net Wed Aug 20 13:15:41 2008
-From: David Brownell <david-b@pacbell.net>
-Date: Mon, 18 Aug 2008 17:41:02 -0700
-Subject: usb gadget: link fixes for serial gadget
-To: Greg KH <greg@kroah.com>
-Cc: linux-usb@vger.kernel.org
-Message-ID: <200808181741.02146.david-b@pacbell.net>
-Content-Disposition: inline
-
-
-From: David Brownell <dbrownell@users.sourceforge.net>
-
-Change how the serial gadget driver builds: don't use
-separate compilation, since it works poorly when key parts
-are library code (with init sections etc). Instead be as
-close as we can to "gcc --combine ...".
-
-Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/usb/gadget/Makefile | 2 +-
- drivers/usb/gadget/serial.c | 18 ++++++++++++++++++
- 2 files changed, 19 insertions(+), 1 deletion(-)
-
---- a/drivers/usb/gadget/Makefile
-+++ b/drivers/usb/gadget/Makefile
-@@ -26,7 +26,7 @@ C_UTILS = composite.o usbstring.o config
-
- g_zero-objs := zero.o f_sourcesink.o f_loopback.o $(C_UTILS)
- g_ether-objs := ether.o u_ether.o f_subset.o f_ecm.o $(C_UTILS)
--g_serial-objs := serial.o u_serial.o f_acm.o f_serial.o $(C_UTILS)
-+g_serial-objs := serial.o
- g_midi-objs := gmidi.o usbstring.o config.o epautoconf.o
- gadgetfs-objs := inode.o
- g_file_storage-objs := file_storage.o usbstring.o config.o \
---- a/drivers/usb/gadget/serial.c
-+++ b/drivers/usb/gadget/serial.c
-@@ -30,6 +30,24 @@
-
- /*-------------------------------------------------------------------------*/
-
-+/*
-+ * Kbuild is not very cooperative with respect to linking separately
-+ * compiled library objects into one module. So for now we won't use
-+ * separate compilation ... ensuring init/exit sections work to shrink
-+ * the runtime footprint, and giving us at least some parts of what
-+ * a "gcc --combine ... part1.c part2.c part3.c ... " build would.
-+ */
-+#include "composite.c"
-+#include "usbstring.c"
-+#include "config.c"
-+#include "epautoconf.c"
-+
-+#include "f_acm.c"
-+#include "f_serial.c"
-+#include "u_serial.c"
-+
-+/*-------------------------------------------------------------------------*/
-+
- /* Thanks to NetChip Technologies for donating this product ID.
- *
- * DO NOT REUSE THESE IDs with a protocol-incompatible driver!! Ever!!
diff --git a/driver-core/usb-gadget-link-fixes-for-storage-gadget.patch b/driver-core/usb-gadget-link-fixes-for-storage-gadget.patch
deleted file mode 100644
index d8aa0de4426bf1..00000000000000
--- a/driver-core/usb-gadget-link-fixes-for-storage-gadget.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From david-b@pacbell.net Wed Aug 20 13:18:27 2008
-From: David Brownell <david-b@pacbell.net>
-Date: Mon, 18 Aug 2008 17:43:25 -0700
-Subject: usb gadget: link fixes for storage gadget
-To: Greg KH <greg@kroah.com>
-Cc: linux-usb@vger.kernel.org
-Message-ID: <200808181743.25188.david-b@pacbell.net>
-Content-Disposition: inline
-
-
-From: David Brownell <dbrownell@users.sourceforge.net>
-
-Change how the file storage gadget driver builds: don't
-use separate compilation, since it works poorly when key
-parts are library code (with init sections etc). Instead
-be as close as we can to "gcc --combine ...".
-
-Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/usb/gadget/Makefile | 3 +--
- drivers/usb/gadget/file_storage.c | 12 ++++++++++++
- 2 files changed, 13 insertions(+), 2 deletions(-)
-
---- a/drivers/usb/gadget/file_storage.c
-+++ b/drivers/usb/gadget/file_storage.c
-@@ -245,6 +245,18 @@
- #include "gadget_chips.h"
-
-
-+
-+/*
-+ * Kbuild is not very cooperative with respect to linking separately
-+ * compiled library objects into one module. So for now we won't use
-+ * separate compilation ... ensuring init/exit sections work to shrink
-+ * the runtime footprint, and giving us at least some parts of what
-+ * a "gcc --combine ... part1.c part2.c part3.c ... " build would.
-+ */
-+#include "usbstring.c"
-+#include "config.c"
-+#include "epautoconf.c"
-+
- /*-------------------------------------------------------------------------*/
-
- #define DRIVER_DESC "File-backed Storage Gadget"
---- a/drivers/usb/gadget/Makefile
-+++ b/drivers/usb/gadget/Makefile
-@@ -29,8 +29,7 @@ g_ether-objs := ether.o u_ether.o f_su
- g_serial-objs := serial.o
- g_midi-objs := gmidi.o
- gadgetfs-objs := inode.o
--g_file_storage-objs := file_storage.o usbstring.o config.o \
-- epautoconf.o
-+g_file_storage-objs := file_storage.o
- g_printer-objs := printer.o
- g_cdc-objs := cdc2.o u_ether.o f_ecm.o \
- u_serial.o f_acm.o $(C_UTILS)
diff --git a/driver-core/usb-turn-dev_warn-warn_on-combos-into-dev_warn.patch b/driver-core/usb-turn-dev_warn-warn_on-combos-into-dev_warn.patch
deleted file mode 100644
index 56525722d509a7..00000000000000
--- a/driver-core/usb-turn-dev_warn-warn_on-combos-into-dev_warn.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From arjan@infradead.org Tue Sep 23 15:55:54 2008
-From: Arjan van de Ven <arjan@linux.intel.com>
-Date: Sat, 20 Sep 2008 19:09:37 -0700
-Subject: usb: turn dev_warn+WARN_ON combos into dev_WARN
-To: Greg KH <greg@kroah.com>
-Message-ID: <20080920190937.45009b5a@infradead.org>
-
-
-From: Arjan van de Ven <arjan@linux.intel.com>
-
-dev_WARN is both compacter and gives better debug information
-than just a WARN_ON, since people and tools will copy the device
-information message together with the WARN_ON in bug reports.
-
-Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/usb/host/uhci-q.c | 24 ++++++++----------------
- 1 file changed, 8 insertions(+), 16 deletions(-)
-
---- a/drivers/usb/host/uhci-q.c
-+++ b/drivers/usb/host/uhci-q.c
-@@ -123,14 +123,10 @@ static struct uhci_td *uhci_alloc_td(str
-
- static void uhci_free_td(struct uhci_hcd *uhci, struct uhci_td *td)
- {
-- if (!list_empty(&td->list)) {
-- dev_warn(uhci_dev(uhci), "td %p still in list!\n", td);
-- WARN_ON(1);
-- }
-- if (!list_empty(&td->fl_list)) {
-- dev_warn(uhci_dev(uhci), "td %p still in fl_list!\n", td);
-- WARN_ON(1);
-- }
-+ if (!list_empty(&td->list))
-+ dev_WARN(uhci_dev(uhci), "td %p still in list!\n", td);
-+ if (!list_empty(&td->fl_list))
-+ dev_WARN(uhci_dev(uhci), "td %p still in fl_list!\n", td);
-
- dma_pool_free(uhci->td_pool, td, td->dma_handle);
- }
-@@ -295,10 +291,8 @@ static struct uhci_qh *uhci_alloc_qh(str
- static void uhci_free_qh(struct uhci_hcd *uhci, struct uhci_qh *qh)
- {
- WARN_ON(qh->state != QH_STATE_IDLE && qh->udev);
-- if (!list_empty(&qh->queue)) {
-- dev_warn(uhci_dev(uhci), "qh %p list not empty!\n", qh);
-- WARN_ON(1);
-- }
-+ if (!list_empty(&qh->queue))
-+ dev_WARN(uhci_dev(uhci), "qh %p list not empty!\n", qh);
-
- list_del(&qh->node);
- if (qh->udev) {
-@@ -746,11 +740,9 @@ static void uhci_free_urb_priv(struct uh
- {
- struct uhci_td *td, *tmp;
-
-- if (!list_empty(&urbp->node)) {
-- dev_warn(uhci_dev(uhci), "urb %p still on QH's list!\n",
-+ if (!list_empty(&urbp->node))
-+ dev_WARN(uhci_dev(uhci), "urb %p still on QH's list!\n",
- urbp->urb);
-- WARN_ON(1);
-- }
-
- list_for_each_entry_safe(td, tmp, &urbp->td_list, list) {
- uhci_remove_td_from_urbp(td);
diff --git a/gregkh/sysrq-u-laptop.patch b/gregkh/sysrq-u-laptop.patch
index 9975d35cd816b4..66b0b7a09a5bad 100644
--- a/gregkh/sysrq-u-laptop.patch
+++ b/gregkh/sysrq-u-laptop.patch
@@ -12,7 +12,7 @@ From: Greg Kroah-Hartman <gregkh@suse.de>
--- a/drivers/char/sysrq.c
+++ b/drivers/char/sysrq.c
-@@ -403,7 +403,7 @@ static struct sysrq_key_op *sysrq_key_ta
+@@ -405,7 +405,7 @@ static struct sysrq_key_op *sysrq_key_ta
/* x: May be registered on ppc/powerpc for xmon */
NULL, /* x */
/* y: May be registered on sparc64 for global register dump */
diff --git a/series b/series
index a9c01055c7cbf5..54db5ec13b9583 100644
--- a/series
+++ b/series
@@ -5,18 +5,20 @@ gregkh/detect-atomic-counter-underflows.patch
#####################################################################
-# Stuff to be merged for 2.6.27
+# Stuff to be merged for 2.6.28
#####################################################################
#################################
-# Driver core patches for 2.6.27
+# Driver core patches for 2.6.28
#################################
-driver-core.current/modules-fix-module-notes-kobject-leak.patch
-
+driver-core.current/document-kernel-taint-flags-properly.patch
#################################
-# USB patches for 2.6.27
+# USB patches for 2.6.28
#################################
+
+# usb.current/usb-fix-build-warning-in-ehci-hcd-when-config_usb_debug-is-not-enabled.patch
+
usb.current/usb-option-add-ericsson-f3507g-and-dell-5530.patch
usb.current/usb-option.c-remove-duplicate-device-ids-now-supported-in-hso.c.patch
usb.current/usb-add-oceanic-product-id-to-ftdi_sio.patch
@@ -26,63 +28,13 @@ usb.current/usb-add-usb-test-and-measurement-class-driver.patch
#####################################################################
-# Stuff to be merged after 2.6.27 is out
+# Stuff to be merged after 2.6.28 is out
#####################################################################
#################################
-# Driver core patches for after 2.6.27 is out
+# Driver core patches for after 2.6.28 is out
#################################
-driver-core/sysfs-crash-debugging.patch
-
-driver-core/device-create-block-convert-device_create_drvdata-to-device_create.patch
-driver-core/device-create-char-convert-device_create_drvdata-to-device_create.patch
-driver-core/device-create-ieee1394-convert-device_create_drvdata-to-device_create.patch
-driver-core/device-create-infiniband-convert-device_create_drvdata-to-device_create.patch
-driver-core/device-create-misc-convert-device_create_drvdata-to-device_create.patch
-driver-core/device-create-net-convert-device_create_drvdata-to-device_create.patch
-driver-core/device-create-s390-convert-device_create_drvdata-to-device_create.patch
-driver-core/device-create-scsi-convert-device_create_drvdata-to-device_create.patch
-driver-core/device-create-sound-convert-device_create_drvdata-to-device_create.patch
-driver-core/device-create-usb-convert-device_create_drvdata-to-device_create.patch
-driver-core/device-create-video-convert-device_create_drvdata-to-device_create.patch
-driver-core/device-create-ide-convert-device_create_drvdata-to-device_create.patch
-driver-core/device-create-remove-device_create_drvdata.patch
-
-# usb patches are needed to get dynamic debug patch to build properly.
-driver-core/usb-gadget-link-fixes-for-serial-gadget.patch
-driver-core/usb-gadget-link-fixes-for-gadget-zero.patch
-driver-core/usb-gadget-link-fixes-for-midi-gadget.patch
-driver-core/usb-gadget-link-fixes-for-printer-gadget.patch
-driver-core/usb-gadget-link-fixes-for-storage-gadget.patch
-driver-core/usb-gadget-link-fixes-for-cdc-composite-gadget.patch
-driver-core/usb-gadget-link-fixes-for-network-gadget.patch
-driver-core/driver-core-basic-infrastructure-for-per-module-dynamic-debug-messages.patch
-
-driver-core/driver-core-make-struct-platform_pm_ops-static.patch
-driver-core/sysfs-support-sysfs_notify-from-atomic-context-with-new-sysfs_notify_dirent.patch
-driver-core/drivers-firmware-iscsi_ibft.c-make-3-functions-static.patch
-driver-core/driver-core-clarify-device-cleanup.patch
-driver-core/driver-core-fix-cleanup-in-device_create_vargs.patch
-driver-core/device-model-do-a-quickcheck-for-driver-binding-before-doing-an-expensive-check.patch
-driver-core/sysfs-fix-deadlock.patch
-driver-core/debug-introduce-a-dev_warn-function.patch
-driver-core/debug-use-dev_warn-rather-than-warn_on-in-device_pm_add.patch
-driver-core/usb-turn-dev_warn-warn_on-combos-into-dev_warn.patch
-driver-core/driver-core-make-bus_find_device_by_name-more-robust.patch
-driver-core/pnp-create-device-attributes-via-default-device-attributes.patch
-driver-core/sysfs-use-ilookup5-instead-of-ilookup5_nowait.patch
-driver-core/platform-add-new-device-registration-helper.patch
-driver-core/sysfs-make-dir-and-name-args-to-sysfs_notify-const.patch
-driver-core/kobject-fix-kobject_rename-and-config_sysfs.patch
-driver-core/kobject-cleanup-kobject_rename-and-config_sysfs.patch
-driver-core/net-convert-the-phy_device-file-to-use-bus_find_device_by_name.patch
-driver-core/driver-core-add-bus_sort_breadthfirst-function.patch
-
-driver-core/uio-add-alignment-warnings-for-uio-mem.patch
-driver-core/uio-change-driver-name-of-uio_pdrv.patch
-driver-core/uio-add-automata-sercos3-pci-card-support.patch
-driver-core/uio-fix-mapping-of-logical-and-virtual-memory.patch
# multi driver-to-device series
driver-core/driver-core-use-dev_get_drvdata-accessors.patch
diff --git a/staging/staging-add-maintainers-entry.patch b/staging/staging-add-maintainers-entry.patch
index 12cb7956c3dbde..09183376fee30b 100644
--- a/staging/staging-add-maintainers-entry.patch
+++ b/staging/staging-add-maintainers-entry.patch
@@ -14,7 +14,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- a/MAINTAINERS
+++ b/MAINTAINERS
-@@ -3724,6 +3724,13 @@ P: Dean Nelson
+@@ -3736,6 +3736,13 @@ P: Dean Nelson
M: dcn@sgi.com
S: Maintained
diff --git a/staging/staging-add-taint_crap-for-all-drivers-staging-code.patch b/staging/staging-add-taint_crap-for-all-drivers-staging-code.patch
index 45f31df7f1562f..18e5e6bdb6b7f9 100644
--- a/staging/staging-add-taint_crap-for-all-drivers-staging-code.patch
+++ b/staging/staging-add-taint_crap-for-all-drivers-staging-code.patch
@@ -25,8 +25,8 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Documentation/sysctl/kernel.txt | 1 +
include/linux/kernel.h | 1 +
kernel/module.c | 11 +++++++++++
- kernel/panic.c | 6 ++++--
- 4 files changed, 17 insertions(+), 2 deletions(-)
+ kernel/panic.c | 2 ++
+ 4 files changed, 15 insertions(+)
--- a/Documentation/sysctl/kernel.txt
+++ b/Documentation/sysctl/kernel.txt
@@ -38,11 +38,11 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
-@@ -261,6 +261,7 @@ extern enum system_states {
- #define TAINT_DIE (1<<7)
- #define TAINT_OVERRIDDEN_ACPI_TABLE (1<<8)
- #define TAINT_WARN (1<<9)
-+#define TAINT_CRAP (1<<10)
+@@ -265,6 +265,7 @@ extern enum system_states {
+ #define TAINT_DIE 7
+ #define TAINT_OVERRIDDEN_ACPI_TABLE 8
+ #define TAINT_WARN 9
++#define TAINT_CRAP 10
extern void dump_stack(void) __cold;
@@ -73,7 +73,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (IS_ERR(args)) {
@@ -2587,6 +2596,8 @@ static char *module_flags(struct module
buf[bx++] = 'P';
- if (mod->taints & TAINT_FORCED_MODULE)
+ if (mod->taints & (1 << TAINT_FORCED_MODULE))
buf[bx++] = 'F';
+ if (mod->taints & TAINT_CRAP)
+ buf[bx++] = 'C';
@@ -82,7 +82,15 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* TAINT_UNSAFE_SMP, TAINT_MACHINE_CHECK, TAINT_BAD_PAGE don't
--- a/kernel/panic.c
+++ b/kernel/panic.c
-@@ -155,6 +155,7 @@ EXPORT_SYMBOL(panic);
+@@ -161,6 +161,7 @@ static const struct tnt tnts[] = {
+ { TAINT_DIE, 'D', ' ' },
+ { TAINT_OVERRIDDEN_ACPI_TABLE, 'A', ' ' },
+ { TAINT_WARN, 'W', ' ' },
++ { TAINT_CRAP, 'C', ' ' },
+ };
+
+ /**
+@@ -175,6 +176,7 @@ static const struct tnt tnts[] = {
* 'U' - Userspace-defined naughtiness.
* 'A' - ACPI table overridden.
* 'W' - Taint on warning.
@@ -90,22 +98,3 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
*
* The string is overwritten by the next call to print_taint().
*/
-@@ -163,7 +164,7 @@ const char *print_tainted(void)
- {
- static char buf[20];
- if (tainted) {
-- snprintf(buf, sizeof(buf), "Tainted: %c%c%c%c%c%c%c%c%c%c",
-+ snprintf(buf, sizeof(buf), "Tainted: %c%c%c%c%c%c%c%c%c%c%c",
- tainted & TAINT_PROPRIETARY_MODULE ? 'P' : 'G',
- tainted & TAINT_FORCED_MODULE ? 'F' : ' ',
- tainted & TAINT_UNSAFE_SMP ? 'S' : ' ',
-@@ -173,7 +174,8 @@ const char *print_tainted(void)
- tainted & TAINT_USER ? 'U' : ' ',
- tainted & TAINT_DIE ? 'D' : ' ',
- tainted & TAINT_OVERRIDDEN_ACPI_TABLE ? 'A' : ' ',
-- tainted & TAINT_WARN ? 'W' : ' ');
-+ tainted & TAINT_WARN ? 'W' : ' ',
-+ tainted & TAINT_CRAP ? 'C' : ' ');
- }
- else
- snprintf(buf, sizeof(buf), "Not tainted");
diff --git a/usb/usb-ehci-fix-remote-wakeup-support-for-arc-tdi-core.patch b/usb/usb-ehci-fix-remote-wakeup-support-for-arc-tdi-core.patch
index 37ece8adac3b5d..cf6175240af175 100644
--- a/usb/usb-ehci-fix-remote-wakeup-support-for-arc-tdi-core.patch
+++ b/usb/usb-ehci-fix-remote-wakeup-support-for-arc-tdi-core.patch
@@ -41,7 +41,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
struct dma_pool *qh_pool; /* qh per active urb */
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
-@@ -705,7 +705,7 @@ static irqreturn_t ehci_irq (struct usb_
+@@ -706,7 +706,7 @@ static irqreturn_t ehci_irq (struct usb_
pcd_status = status;
/* resume root hub? */
@@ -50,7 +50,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
usb_hcd_resume_root_hub(hcd);
while (i--) {
-@@ -714,8 +714,11 @@ static irqreturn_t ehci_irq (struct usb_
+@@ -715,8 +715,11 @@ static irqreturn_t ehci_irq (struct usb_
if (pstatus & PORT_OWNER)
continue;
@@ -64,7 +64,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
continue;
/* start 20 msec resume signaling from this port,
-@@ -730,9 +733,8 @@ static irqreturn_t ehci_irq (struct usb_
+@@ -731,9 +734,8 @@ static irqreturn_t ehci_irq (struct usb_
/* PCI errors [4.15.2.4] */
if (unlikely ((status & STS_FATAL) != 0)) {
diff --git a/usb/usb-ehci-log-a-warning-if-ehci-hcd-is-not-loaded-first.patch b/usb/usb-ehci-log-a-warning-if-ehci-hcd-is-not-loaded-first.patch
index cdcfdc45315b9b..52352aa0529d7a 100644
--- a/usb/usb-ehci-log-a-warning-if-ehci-hcd-is-not-loaded-first.patch
+++ b/usb/usb-ehci-log-a-warning-if-ehci-hcd-is-not-loaded-first.patch
@@ -51,7 +51,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
#endif /* __KERNEL__ */
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
-@@ -1045,6 +1045,12 @@ static int __init ehci_hcd_init(void)
+@@ -1046,6 +1046,12 @@ static int __init ehci_hcd_init(void)
return -ENODEV;
printk(KERN_INFO "%s: " DRIVER_DESC "\n", hcd_name);
@@ -64,7 +64,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
pr_debug("%s: block sizes: qh %Zd qtd %Zd itd %Zd sitd %Zd\n",
hcd_name,
sizeof(struct ehci_qh), sizeof(struct ehci_qtd),
-@@ -1052,8 +1058,10 @@ static int __init ehci_hcd_init(void)
+@@ -1053,8 +1059,10 @@ static int __init ehci_hcd_init(void)
#ifdef DEBUG
ehci_debug_root = debugfs_create_dir("ehci", NULL);
@@ -77,7 +77,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
#endif
#ifdef PLATFORM_DRIVER
-@@ -1101,6 +1109,8 @@ clean0:
+@@ -1102,6 +1110,8 @@ clean0:
debugfs_remove(ehci_debug_root);
ehci_debug_root = NULL;
#endif
@@ -86,7 +86,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return retval;
}
module_init(ehci_hcd_init);
-@@ -1122,6 +1132,7 @@ static void __exit ehci_hcd_cleanup(void
+@@ -1123,6 +1133,7 @@ static void __exit ehci_hcd_cleanup(void
#ifdef DEBUG
debugfs_remove(ehci_debug_root);
#endif
diff --git a/usb/usb-ehci-ohci-uhci-remove-version-numbers.patch b/usb/usb-ehci-ohci-uhci-remove-version-numbers.patch
index 8384ab5895d7f7..737f6b05419bd3 100644
--- a/usb/usb-ehci-ohci-uhci-remove-version-numbers.patch
+++ b/usb/usb-ehci-ohci-uhci-remove-version-numbers.patch
@@ -45,7 +45,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
hcd->self.controller->bus->name,
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
-@@ -59,7 +59,6 @@
+@@ -60,7 +60,6 @@
* providing early devices for those host controllers to talk to!
*/
@@ -53,7 +53,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
#define DRIVER_AUTHOR "David Brownell"
#define DRIVER_DESC "USB 2.0 'Enhanced' Host Controller (EHCI) Driver"
-@@ -620,9 +619,9 @@ static int ehci_run (struct usb_hcd *hcd
+@@ -621,9 +620,9 @@ static int ehci_run (struct usb_hcd *hcd
temp = HC_VERSION(ehci_readl(ehci, &ehci->caps->hc_capbase));
ehci_info (ehci,
@@ -65,7 +65,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
ignore_oc ? ", overcurrent ignored" : "");
ehci_writel(ehci, INTR_MASK,
-@@ -994,9 +993,7 @@ static int ehci_get_frame (struct usb_hc
+@@ -995,9 +994,7 @@ static int ehci_get_frame (struct usb_hc
/*-------------------------------------------------------------------------*/
@@ -76,7 +76,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
MODULE_AUTHOR (DRIVER_AUTHOR);
MODULE_LICENSE ("GPL");
-@@ -1044,6 +1041,10 @@ static int __init ehci_hcd_init(void)
+@@ -1045,6 +1042,10 @@ static int __init ehci_hcd_init(void)
{
int retval = 0;
diff --git a/usb/usb-hub.c-add-initial_descriptor_timeout-module-parameter-for-usbcore.patch b/usb/usb-hub.c-add-initial_descriptor_timeout-module-parameter-for-usbcore.patch
index c36f0370387962..72742c9190bc02 100644
--- a/usb/usb-hub.c-add-initial_descriptor_timeout-module-parameter-for-usbcore.patch
+++ b/usb/usb-hub.c-add-initial_descriptor_timeout-module-parameter-for-usbcore.patch
@@ -29,7 +29,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
-@@ -2252,6 +2252,25 @@ and is between 256 and 4096 characters.
+@@ -2253,6 +2253,25 @@ and is between 256 and 4096 characters.
autosuspended. Devices for which the delay is set
to a negative value won't be autosuspended at all.
diff --git a/usb/usb-remove-code-associated-with-config_ppc_merge.patch b/usb/usb-remove-code-associated-with-config_ppc_merge.patch
index 2b3393f6c9b5de..80be741912a397 100644
--- a/usb/usb-remove-code-associated-with-config_ppc_merge.patch
+++ b/usb/usb-remove-code-associated-with-config_ppc_merge.patch
@@ -46,7 +46,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
#define writel_be(val, addr) __raw_writel(val, (__force unsigned *)addr)
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
-@@ -1020,11 +1020,6 @@ MODULE_LICENSE ("GPL");
+@@ -1021,11 +1021,6 @@ MODULE_LICENSE ("GPL");
#define PS3_SYSTEM_BUS_DRIVER ps3_ehci_driver
#endif
diff --git a/usb/usb-remove-info-macro-from-usb-input-drivers.patch b/usb/usb-remove-info-macro-from-usb-input-drivers.patch
index 4f13907ef54694..9f5ceba114131e 100644
--- a/usb/usb-remove-info-macro-from-usb-input-drivers.patch
+++ b/usb/usb-remove-info-macro-from-usb-input-drivers.patch
@@ -73,7 +73,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- a/drivers/input/tablet/aiptek.c
+++ b/drivers/input/tablet/aiptek.c
-@@ -1821,8 +1821,9 @@ aiptek_probe(struct usb_interface *intf,
+@@ -1844,8 +1844,9 @@ aiptek_probe(struct usb_interface *intf,
aiptek->curSetting.programmableDelay = speeds[i];
(void)aiptek_program_tablet(aiptek);
if (aiptek->inputdev->absmax[ABS_X] > 0) {
@@ -85,7 +85,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
break;
}
}
-@@ -1830,7 +1831,8 @@ aiptek_probe(struct usb_interface *intf,
+@@ -1853,7 +1854,8 @@ aiptek_probe(struct usb_interface *intf,
/* Murphy says that some day someone will have a tablet that fails the
above test. That's you, Frederic Rodrigo */
if (i == ARRAY_SIZE(speeds)) {
@@ -95,7 +95,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
goto fail2;
}
-@@ -1902,8 +1904,9 @@ static int __init aiptek_init(void)
+@@ -1925,8 +1927,9 @@ static int __init aiptek_init(void)
{
int result = usb_register(&aiptek_driver);
if (result == 0) {
diff --git a/usb/usb-remove-warn-macro-from-usb-input-drivers.patch b/usb/usb-remove-warn-macro-from-usb-input-drivers.patch
index 1713c5970e3616..d95f79bb36e106 100644
--- a/usb/usb-remove-warn-macro-from-usb-input-drivers.patch
+++ b/usb/usb-remove-warn-macro-from-usb-input-drivers.patch
@@ -275,7 +275,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- a/drivers/input/tablet/aiptek.c
+++ b/drivers/input/tablet/aiptek.c
-@@ -1683,20 +1683,21 @@ aiptek_probe(struct usb_interface *intf,
+@@ -1706,20 +1706,21 @@ aiptek_probe(struct usb_interface *intf,
aiptek = kzalloc(sizeof(struct aiptek), GFP_KERNEL);
inputdev = input_allocate_device();
if (!aiptek || !inputdev) {
@@ -300,7 +300,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
goto fail2;
}
-@@ -1841,7 +1842,8 @@ aiptek_probe(struct usb_interface *intf,
+@@ -1864,7 +1865,8 @@ aiptek_probe(struct usb_interface *intf,
*/
err = sysfs_create_group(&intf->dev.kobj, &aiptek_attribute_group);
if (err) {
@@ -310,7 +310,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
goto fail3;
}
-@@ -1849,7 +1851,8 @@ aiptek_probe(struct usb_interface *intf,
+@@ -1872,7 +1874,8 @@ aiptek_probe(struct usb_interface *intf,
*/
err = input_register_device(aiptek->inputdev);
if (err) {
diff --git a/version b/version
index eefa163244683d..29312711636fa7 100644
--- a/version
+++ b/version
@@ -1 +1 @@
-2.6.27-git5
+2.6.27-git7