aboutsummaryrefslogtreecommitdiffstats
path: root/driver
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2006-06-22 10:20:03 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2006-06-22 10:20:03 -0700
commitca210fbbfc5f1b9e76f518bccd080a05386537ad (patch)
tree38e5445c1c9832e5b5e39da862e413c2d7c0dfba /driver
parentc16d033288d8409b168cccfdfa12a9b413466c57 (diff)
downloadpatches-ca210fbbfc5f1b9e76f518bccd080a05386537ad.tar.gz
remove driver core patches that made it into mainline
Diffstat (limited to 'driver')
-rw-r--r--driver/cciss-device-symlink.patch23
-rw-r--r--driver/device-class.patch305
-rw-r--r--driver/device-symlinks-for-classes.patch68
-rw-r--r--driver/driver-core-add-generic-subsystem-link-to-all-devices.patch144
-rw-r--r--driver/driver-core-add-sys-hypervisor-when-needed.patch103
-rw-r--r--driver/driver-core-allow-sysdev_class-have-attributes.patch113
-rw-r--r--driver/driver-core-bus-device-event-delay.patch99
-rw-r--r--driver/driver-core-class_device_add-needs-error-checks.patch147
-rw-r--r--driver/driver-core-config_debug_pm-covers-drivers-base-power-too.patch26
-rw-r--r--driver/driver-core-fix-platform_device_add-to-use-device_add.patch31
-rw-r--r--driver/driver-core-make-dev_info-and-friends-print-the-bus-name-if-there-is-no-driver.patch60
-rw-r--r--driver/driver-core-pm_debug-device-suspend-messages-become-informative.patch56
-rw-r--r--driver/driver-core-remove-exports.patch164
-rw-r--r--driver/driver-model-add-isa-bus.patch373
-rw-r--r--driver/firmware_class-s-semaphores-mutexes.patch110
-rw-r--r--driver/i4l-gigaset-move-sysfs-entry-to-tty-class-device.patch195
-rw-r--r--driver/kobject_add-make-people-pay-attention-to-errors.patch34
-rw-r--r--driver/make_class_name-kobj.patch98
-rw-r--r--driver/platform_bus-learns-about-modalias.patch69
-rw-r--r--driver/remove-duplication-from-documentation-power-devices_txt.patch115
-rw-r--r--driver/stable-abi-docs.patch208
-rw-r--r--driver/tty-return-class-device-pointer-from-tty_register_device.patch74
22 files changed, 0 insertions, 2615 deletions
diff --git a/driver/cciss-device-symlink.patch b/driver/cciss-device-symlink.patch
deleted file mode 100644
index 40dde5dea662f..0000000000000
--- a/driver/cciss-device-symlink.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From foo@baz Tue Apr 9 12:12:43 2002
-Date: Thu, 27 Apr 2006 15:46:39 -0700
-To: Greg KH <greg@kroah.com>
-From: Greg Kroah-Hartman <gregkh@suse.de>
-Subject: CCISS: add device symlink to the block cciss block devices in sysfs
-
-
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/block/cciss.c | 1 +
- 1 file changed, 1 insertion(+)
-
---- gregkh-2.6.orig/drivers/block/cciss.c
-+++ gregkh-2.6/drivers/block/cciss.c
-@@ -3237,6 +3237,7 @@ static int __devinit cciss_init_one(stru
- disk->fops = &cciss_fops;
- disk->queue = q;
- disk->private_data = drv;
-+ disk->driverfs_dev = &pdev->dev;
- /* we must register the controller even if no disks exist */
- /* this is for the online array utilities */
- if(!drv->heads && j)
diff --git a/driver/device-class.patch b/driver/device-class.patch
deleted file mode 100644
index 122af68097fa9..0000000000000
--- a/driver/device-class.patch
+++ /dev/null
@@ -1,305 +0,0 @@
-From foo@baz Tue Apr 9 12:12:43 2002
-Date: Wed, 14 Jun 2006 12:14:34 -0700
-To: Greg KH <greg@kroah.com>
-From: Greg Kroah-Hartman <gregkh@suse.de>
-Subject: Driver core: allow struct device to have a dev_t
-
-This is the first step in moving class_device to being replaced by
-struct device. It allows struct device to export a dev_t and makes it
-easy to dynamically create and destroy struct device as long as they are
-associated with a specific class.
-
-Cc: Kay Sievers <kay.sievers@vrfy.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/base/class.c | 1
- drivers/base/core.c | 162 ++++++++++++++++++++++++++++++++++++++++++++++++-
- include/linux/device.h | 14 ++++
- 3 files changed, 176 insertions(+), 1 deletion(-)
-
---- gregkh-2.6.orig/drivers/base/class.c
-+++ gregkh-2.6/drivers/base/class.c
-@@ -142,6 +142,7 @@ int class_register(struct class * cls)
- pr_debug("device class '%s': registering\n", cls->name);
-
- INIT_LIST_HEAD(&cls->children);
-+ INIT_LIST_HEAD(&cls->devices);
- INIT_LIST_HEAD(&cls->interfaces);
- init_MUTEX(&cls->sem);
- error = kobject_set_name(&cls->subsys.kset.kobj, "%s", cls->name);
---- gregkh-2.6.orig/drivers/base/core.c
-+++ gregkh-2.6/drivers/base/core.c
-@@ -15,6 +15,7 @@
- #include <linux/module.h>
- #include <linux/slab.h>
- #include <linux/string.h>
-+#include <linux/kdev_t.h>
-
- #include <asm/semaphore.h>
-
-@@ -98,6 +99,8 @@ static int dev_uevent_filter(struct kset
- struct device *dev = to_dev(kobj);
- if (dev->bus)
- return 1;
-+ if (dev->class)
-+ return 1;
- }
- return 0;
- }
-@@ -106,7 +109,11 @@ static const char *dev_uevent_name(struc
- {
- struct device *dev = to_dev(kobj);
-
-- return dev->bus->name;
-+ if (dev->bus)
-+ return dev->bus->name;
-+ if (dev->class)
-+ return dev->class->name;
-+ return NULL;
- }
-
- static int dev_uevent(struct kset *kset, struct kobject *kobj, char **envp,
-@@ -117,6 +124,16 @@ static int dev_uevent(struct kset *kset,
- int length = 0;
- int retval = 0;
-
-+ /* add the major/minor if present */
-+ if (MAJOR(dev->devt)) {
-+ add_uevent_var(envp, num_envp, &i,
-+ buffer, buffer_size, &length,
-+ "MAJOR=%u", MAJOR(dev->devt));
-+ add_uevent_var(envp, num_envp, &i,
-+ buffer, buffer_size, &length,
-+ "MINOR=%u", MINOR(dev->devt));
-+ }
-+
- /* add bus name of physical device */
- if (dev->bus)
- add_uevent_var(envp, num_envp, &i,
-@@ -161,6 +178,12 @@ static ssize_t store_uevent(struct devic
- return count;
- }
-
-+static ssize_t show_dev(struct device *dev, struct device_attribute *attr,
-+ char *buf)
-+{
-+ return print_dev_t(buf, dev->devt);
-+}
-+
- /*
- * devices_subsys - structure to be registered with kobject core.
- */
-@@ -231,6 +254,7 @@ void device_initialize(struct device *de
- klist_init(&dev->klist_children, klist_children_get,
- klist_children_put);
- INIT_LIST_HEAD(&dev->dma_pools);
-+ INIT_LIST_HEAD(&dev->node);
- init_MUTEX(&dev->sem);
- device_init_wakeup(dev, 0);
- }
-@@ -274,6 +298,31 @@ int device_add(struct device *dev)
- dev->uevent_attr.store = store_uevent;
- device_create_file(dev, &dev->uevent_attr);
-
-+ if (MAJOR(dev->devt)) {
-+ struct device_attribute *attr;
-+ attr = kzalloc(sizeof(*attr), GFP_KERNEL);
-+ if (!attr) {
-+ error = -ENOMEM;
-+ goto PMError;
-+ }
-+ attr->attr.name = "dev";
-+ attr->attr.mode = S_IRUGO;
-+ if (dev->driver)
-+ attr->attr.owner = dev->driver->owner;
-+ attr->show = show_dev;
-+ error = device_create_file(dev, attr);
-+ if (error) {
-+ kfree(attr);
-+ goto attrError;
-+ }
-+
-+ dev->devt_attr = attr;
-+ }
-+
-+ if (dev->class)
-+ sysfs_create_link(&dev->class->subsys.kset.kobj, &dev->kobj,
-+ dev->bus_id);
-+
- if ((error = device_pm_add(dev)))
- goto PMError;
- if ((error = bus_add_device(dev)))
-@@ -292,6 +341,11 @@ int device_add(struct device *dev)
- BusError:
- device_pm_remove(dev);
- PMError:
-+ if (dev->devt_attr) {
-+ device_remove_file(dev, dev->devt_attr);
-+ kfree(dev->devt_attr);
-+ }
-+ attrError:
- kobject_uevent(&dev->kobj, KOBJ_REMOVE);
- kobject_del(&dev->kobj);
- Error:
-@@ -366,6 +420,10 @@ void device_del(struct device * dev)
-
- if (parent)
- klist_del(&dev->knode_parent);
-+ if (dev->devt_attr)
-+ device_remove_file(dev, dev->devt_attr);
-+ if (dev->class)
-+ sysfs_remove_link(&dev->class->subsys.kset.kobj, dev->bus_id);
- device_remove_file(dev, &dev->uevent_attr);
-
- /* Notify the platform of the removal, in case they
-@@ -450,3 +508,105 @@ EXPORT_SYMBOL_GPL(put_device);
-
- EXPORT_SYMBOL_GPL(device_create_file);
- EXPORT_SYMBOL_GPL(device_remove_file);
-+
-+
-+static void device_create_release(struct device *dev)
-+{
-+ pr_debug("%s called for %s\n", __FUNCTION__, dev->bus_id);
-+ kfree(dev);
-+}
-+
-+/**
-+ * device_create - creates a device and registers it with sysfs
-+ * @cs: pointer to the struct class that this device should be registered to.
-+ * @parent: pointer to the parent struct device of this new device, if any.
-+ * @dev: the dev_t for the char device to be added.
-+ * @fmt: string for the class device's name
-+ *
-+ * This function can be used by char device classes. A struct
-+ * device will be created in sysfs, registered to the specified
-+ * class.
-+ * A "dev" file will be created, showing the dev_t for the device, if
-+ * the dev_t is not 0,0.
-+ * If a pointer to a parent struct device is passed in, the newly
-+ * created struct device will be a child of that device in sysfs. The
-+ * pointer to the struct device will be returned from the call. Any
-+ * further sysfs files that might be required can be created using this
-+ * pointer.
-+ *
-+ * Note: the struct class passed to this function must have previously
-+ * been created with a call to class_create().
-+ */
-+struct device *device_create(struct class *class, struct device *parent,
-+ dev_t devt, char *fmt, ...)
-+{
-+ va_list args;
-+ struct device *dev = NULL;
-+ int retval = -ENODEV;
-+
-+ if (class == NULL || IS_ERR(class))
-+ goto error;
-+ if (parent == NULL) {
-+ printk(KERN_WARNING "%s does not work yet for NULL parents\n", __FUNCTION__);
-+ goto error;
-+ }
-+
-+ dev = kzalloc(sizeof(*dev), GFP_KERNEL);
-+ if (!dev) {
-+ retval = -ENOMEM;
-+ goto error;
-+ }
-+
-+ dev->devt = devt;
-+ dev->class = class;
-+ dev->parent = parent;
-+ dev->release = device_create_release;
-+
-+ va_start(args, fmt);
-+ vsnprintf(dev->bus_id, BUS_ID_SIZE, fmt, args);
-+ va_end(args);
-+ retval = device_register(dev);
-+ if (retval)
-+ goto error;
-+
-+ /* tie the class to the device */
-+ down(&class->sem);
-+ list_add_tail(&dev->node, &class->devices);
-+ up(&class->sem);
-+
-+ return dev;
-+
-+error:
-+ kfree(dev);
-+ return ERR_PTR(retval);
-+}
-+EXPORT_SYMBOL_GPL(device_create);
-+
-+/**
-+ * device_destroy - removes a device that was created with device_create()
-+ * @class: the pointer to the struct class that this device was registered * with.
-+ * @dev: the dev_t of the device that was previously registered.
-+ *
-+ * This call unregisters and cleans up a class device that was created with a
-+ * call to class_device_create()
-+ */
-+void device_destroy(struct class *class, dev_t devt)
-+{
-+ struct device *dev = NULL;
-+ struct device *dev_tmp;
-+
-+ down(&class->sem);
-+ list_for_each_entry(dev_tmp, &class->devices, node) {
-+ if (dev_tmp->devt == devt) {
-+ dev = dev_tmp;
-+ break;
-+ }
-+ }
-+ up(&class->sem);
-+
-+ if (dev) {
-+ list_del_init(&dev->node);
-+ device_unregister(dev);
-+ }
-+}
-+EXPORT_SYMBOL_GPL(device_destroy);
---- gregkh-2.6.orig/include/linux/device.h
-+++ gregkh-2.6/include/linux/device.h
-@@ -142,6 +142,7 @@ struct class {
-
- struct subsystem subsys;
- struct list_head children;
-+ struct list_head devices;
- struct list_head interfaces;
- struct semaphore sem; /* locks both the children and interfaces lists */
-
-@@ -305,6 +306,7 @@ struct device {
- struct kobject kobj;
- char bus_id[BUS_ID_SIZE]; /* position on parent bus */
- struct device_attribute uevent_attr;
-+ struct device_attribute *devt_attr;
-
- struct semaphore sem; /* semaphore to synchronize calls to
- * its driver.
-@@ -332,6 +334,11 @@ struct device {
- struct dma_coherent_mem *dma_mem; /* internal for coherent mem
- override */
-
-+ /* class_device migration path */
-+ struct list_head node;
-+ struct class *class; /* optional*/
-+ dev_t devt; /* dev_t, creates the sysfs "dev" */
-+
- void (*release)(struct device * dev);
- };
-
-@@ -373,6 +380,13 @@ extern int device_attach(struct device
- extern void driver_attach(struct device_driver * drv);
- extern void device_reprobe(struct device *dev);
-
-+/*
-+ * Easy functions for dynamically creating devices on the fly
-+ */
-+extern struct device *device_create(struct class *cls, struct device *parent,
-+ dev_t devt, char *fmt, ...)
-+ __attribute__((format(printf,4,5)));
-+extern void device_destroy(struct class *cls, dev_t devt);
-
- /*
- * Platform "fixup" functions - allow the platform to have their say
diff --git a/driver/device-symlinks-for-classes.patch b/driver/device-symlinks-for-classes.patch
deleted file mode 100644
index 0f64f718de4de..0000000000000
--- a/driver/device-symlinks-for-classes.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From foo@baz Tue Apr 9 12:12:43 2002
-Date: Tue, 20 Jun 2006 13:59:20 -0700
-To: Greg KH <greg@kroah.com>
-From: Greg Kroah-Hartman <gregkh@suse.de>
-Subject: Driver core: add proper symlinks for devices
-
-We need to create the "compatible" symlinks that class_devices used to
-create when they were in the class directories so that userspace does
-not know anything changed at all.
-
-Yeah, we have a lot of symlinks now, but we should be able to get rid of
-them in a year or two... (wishful thinking...)
-
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
-
----
- drivers/base/core.c | 11 +++++++++++
- 1 file changed, 11 insertions(+)
-
---- gregkh-2.6.orig/drivers/base/core.c
-+++ gregkh-2.6/drivers/base/core.c
-@@ -273,6 +273,7 @@ void device_initialize(struct device *de
- int device_add(struct device *dev)
- {
- struct device *parent = NULL;
-+ char *class_name = NULL;
- int error = -EINVAL;
-
- dev = get_device(dev);
-@@ -324,6 +325,10 @@ int device_add(struct device *dev)
- "subsystem");
- sysfs_create_link(&dev->class->subsys.kset.kobj, &dev->kobj,
- dev->bus_id);
-+
-+ sysfs_create_link(&dev->kobj, &dev->parent->kobj, "device");
-+ class_name = make_class_name(dev->class->name, &dev->kobj);
-+ sysfs_create_link(&dev->parent->kobj, &dev->kobj, class_name);
- }
-
- if ((error = device_pm_add(dev)))
-@@ -339,6 +344,7 @@ int device_add(struct device *dev)
- if (platform_notify)
- platform_notify(dev);
- Done:
-+ kfree(class_name);
- put_device(dev);
- return error;
- BusError:
-@@ -420,6 +426,7 @@ void put_device(struct device * dev)
- void device_del(struct device * dev)
- {
- struct device * parent = dev->parent;
-+ char *class_name = NULL;
-
- if (parent)
- klist_del(&dev->knode_parent);
-@@ -428,6 +435,10 @@ void device_del(struct device * dev)
- if (dev->class) {
- sysfs_remove_link(&dev->kobj, "subsystem");
- sysfs_remove_link(&dev->class->subsys.kset.kobj, dev->bus_id);
-+ class_name = make_class_name(dev->class->name, &dev->kobj);
-+ sysfs_remove_link(&dev->kobj, "device");
-+ sysfs_remove_link(&dev->parent->kobj, class_name);
-+ kfree(class_name);
- }
- device_remove_file(dev, &dev->uevent_attr);
-
diff --git a/driver/driver-core-add-generic-subsystem-link-to-all-devices.patch b/driver/driver-core-add-generic-subsystem-link-to-all-devices.patch
deleted file mode 100644
index 56615808d878d..0000000000000
--- a/driver/driver-core-add-generic-subsystem-link-to-all-devices.patch
+++ /dev/null
@@ -1,144 +0,0 @@
-From kay.sievers@vrfy.org Thu Jun 15 06:32:03 2006
-Date: Thu, 15 Jun 2006 15:31:56 +0200
-From: Kay Sievers <kay.sievers@suse.de>
-To: greg@kroah.com
-Subject: Driver core: add generic "subsystem" link to all devices
-Message-ID: <20060615133156.GA9472@vrfy.org>
-
-Like the SUBSYTEM= key we find in the environment of the uevent, this
-creates a generic "subsystem" link in sysfs for every device. Userspace
-usually doesn't care at all if its a "class" or a "bus" device. This
-provides an unified way to determine the subsytem of a device, regardless
-of the way the driver core has created it.
-
-Signed-off-by: Kay Sievers <kay.sievers@suse.de>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- block/genhd.c | 7 ++-----
- drivers/base/bus.c | 2 ++
- drivers/base/class.c | 2 ++
- drivers/base/core.c | 9 +++++++--
- fs/partitions/check.c | 4 ++++
- 5 files changed, 17 insertions(+), 7 deletions(-)
-
---- gregkh-2.6.orig/block/genhd.c
-+++ gregkh-2.6/block/genhd.c
-@@ -17,8 +17,7 @@
- #include <linux/buffer_head.h>
- #include <linux/mutex.h>
-
--static struct subsystem block_subsys;
--
-+struct subsystem block_subsys;
- static DEFINE_MUTEX(block_subsys_lock);
-
- /*
-@@ -511,9 +510,7 @@ static struct kset_uevent_ops block_ueve
- .uevent = block_uevent,
- };
-
--/* declare block_subsys. */
--static decl_subsys(block, &ktype_block, &block_uevent_ops);
--
-+decl_subsys(block, &ktype_block, &block_uevent_ops);
-
- /*
- * aggregate disk stat collector. Uses the same stats that the sysfs
---- gregkh-2.6.orig/drivers/base/bus.c
-+++ gregkh-2.6/drivers/base/bus.c
-@@ -374,6 +374,7 @@ int bus_add_device(struct device * dev)
- error = device_add_attrs(bus, dev);
- if (!error) {
- sysfs_create_link(&bus->devices.kobj, &dev->kobj, dev->bus_id);
-+ sysfs_create_link(&dev->kobj, &dev->bus->subsys.kset.kobj, "subsystem");
- sysfs_create_link(&dev->kobj, &dev->bus->subsys.kset.kobj, "bus");
- }
- }
-@@ -408,6 +409,7 @@ void bus_attach_device(struct device * d
- void bus_remove_device(struct device * dev)
- {
- if (dev->bus) {
-+ sysfs_remove_link(&dev->kobj, "subsystem");
- sysfs_remove_link(&dev->kobj, "bus");
- sysfs_remove_link(&dev->bus->devices.kobj, dev->bus_id);
- device_remove_attrs(dev->bus, dev);
---- gregkh-2.6.orig/drivers/base/class.c
-+++ gregkh-2.6/drivers/base/class.c
-@@ -561,6 +561,7 @@ int class_device_add(struct class_device
- goto out2;
-
- /* add the needed attributes to this device */
-+ sysfs_create_link(&class_dev->kobj, &parent_class->subsys.kset.kobj, "subsystem");
- class_dev->uevent_attr.attr.name = "uevent";
- class_dev->uevent_attr.attr.mode = S_IWUSR;
- class_dev->uevent_attr.attr.owner = parent_class->owner;
-@@ -737,6 +738,7 @@ void class_device_del(struct class_devic
- sysfs_remove_link(&class_dev->kobj, "device");
- sysfs_remove_link(&class_dev->dev->kobj, class_name);
- }
-+ sysfs_remove_link(&class_dev->kobj, "subsystem");
- class_device_remove_file(class_dev, &class_dev->uevent_attr);
- if (class_dev->devt_attr)
- class_device_remove_file(class_dev, class_dev->devt_attr);
---- gregkh-2.6.orig/drivers/base/core.c
-+++ gregkh-2.6/drivers/base/core.c
-@@ -319,9 +319,12 @@ int device_add(struct device *dev)
- dev->devt_attr = attr;
- }
-
-- if (dev->class)
-+ if (dev->class) {
-+ sysfs_create_link(&dev->kobj, &dev->class->subsys.kset.kobj,
-+ "subsystem");
- sysfs_create_link(&dev->class->subsys.kset.kobj, &dev->kobj,
- dev->bus_id);
-+ }
-
- if ((error = device_pm_add(dev)))
- goto PMError;
-@@ -422,8 +425,10 @@ void device_del(struct device * dev)
- klist_del(&dev->knode_parent);
- if (dev->devt_attr)
- device_remove_file(dev, dev->devt_attr);
-- if (dev->class)
-+ if (dev->class) {
-+ sysfs_remove_link(&dev->kobj, "subsystem");
- sysfs_remove_link(&dev->class->subsys.kset.kobj, dev->bus_id);
-+ }
- device_remove_file(dev, &dev->uevent_attr);
-
- /* Notify the platform of the removal, in case they
---- gregkh-2.6.orig/fs/partitions/check.c
-+++ gregkh-2.6/fs/partitions/check.c
-@@ -329,6 +329,7 @@ void delete_partition(struct gendisk *di
- p->ios[0] = p->ios[1] = 0;
- p->sectors[0] = p->sectors[1] = 0;
- devfs_remove("%s/part%d", disk->devfs_name, part);
-+ sysfs_remove_link(&p->kobj, "subsystem");
- if (p->holder_dir)
- kobject_unregister(p->holder_dir);
- kobject_uevent(&p->kobj, KOBJ_REMOVE);
-@@ -363,6 +364,7 @@ void add_partition(struct gendisk *disk,
- kobject_add(&p->kobj);
- if (!disk->part_uevent_suppress)
- kobject_uevent(&p->kobj, KOBJ_ADD);
-+ sysfs_create_link(&p->kobj, &block_subsys.kset.kobj, "subsystem");
- partition_sysfs_add_subdir(p);
- disk->part[part-1] = p;
- }
-@@ -398,6 +400,7 @@ static void disk_sysfs_symlinks(struct g
- kfree(disk_name);
- }
- }
-+ sysfs_create_link(&disk->kobj, &block_subsys.kset.kobj, "subsystem");
- }
-
- /* Not exported, helper to add_disk(). */
-@@ -548,5 +551,6 @@ void del_gendisk(struct gendisk *disk)
- put_device(disk->driverfs_dev);
- disk->driverfs_dev = NULL;
- }
-+ sysfs_remove_link(&disk->kobj, "subsystem");
- kobject_del(&disk->kobj);
- }
diff --git a/driver/driver-core-add-sys-hypervisor-when-needed.patch b/driver/driver-core-add-sys-hypervisor-when-needed.patch
deleted file mode 100644
index 637ada52a9790..0000000000000
--- a/driver/driver-core-add-sys-hypervisor-when-needed.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-From holzheu@de.ibm.com Tue May 9 03:53:55 2006
-Date: Tue, 9 May 2006 12:53:49 +0200
-From: Michael Holzheu <holzheu@de.ibm.com>
-To: greg@kroah.com, akpm@osdl.org
-Cc: <ioe-lkml@rameria.de>, <joern@wohnheim.fh-wedel.de>, <mschwid2@de.ibm.com>, <penberg@cs.helsinki.fi>
-Subject: Driver Core: Add /sys/hypervisor when needed
-Message-Id: <20060509125349.72c974b2.holzheu@de.ibm.com>
-
-To have a home for all hypervisors, this patch creates /sys/hypervisor.
-A new config option SYS_HYPERVISOR is introduced, which should to be set
-by architecture dependent hypervisors (e.g. s390 or Xen).
-
-Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
-
----
- drivers/base/Kconfig | 4 ++++
- drivers/base/Makefile | 1 +
- drivers/base/base.h | 5 +++++
- drivers/base/hypervisor.c | 19 +++++++++++++++++++
- drivers/base/init.c | 1 +
- include/linux/kobject.h | 2 ++
- 6 files changed, 32 insertions(+)
-
---- gregkh-2.6.orig/drivers/base/Kconfig
-+++ gregkh-2.6/drivers/base/Kconfig
-@@ -38,3 +38,7 @@ config DEBUG_DRIVER
- If you are unsure about this, say N here.
-
- endmenu
-+
-+config SYS_HYPERVISOR
-+ bool
-+ default n
---- gregkh-2.6.orig/drivers/base/Makefile
-+++ gregkh-2.6/drivers/base/Makefile
-@@ -9,6 +9,7 @@ obj-$(CONFIG_FW_LOADER) += firmware_clas
- obj-$(CONFIG_NUMA) += node.o
- obj-$(CONFIG_MEMORY_HOTPLUG) += memory.o
- obj-$(CONFIG_SMP) += topology.o
-+obj-$(CONFIG_SYS_HYPERVISOR) += hypervisor.o
-
- ifeq ($(CONFIG_DEBUG_DRIVER),y)
- EXTRA_CFLAGS += -DDEBUG
---- gregkh-2.6.orig/drivers/base/base.h
-+++ gregkh-2.6/drivers/base/base.h
-@@ -5,6 +5,11 @@ extern int devices_init(void);
- extern int buses_init(void);
- extern int classes_init(void);
- extern int firmware_init(void);
-+#ifdef CONFIG_SYS_HYPERVISOR
-+extern int hypervisor_init(void);
-+#else
-+static inline int hypervisor_init(void) { return 0; }
-+#endif
- extern int platform_bus_init(void);
- extern int system_bus_init(void);
- extern int cpu_dev_init(void);
---- /dev/null
-+++ gregkh-2.6/drivers/base/hypervisor.c
-@@ -0,0 +1,19 @@
-+/*
-+ * hypervisor.c - /sys/hypervisor subsystem.
-+ *
-+ * This file is released under the GPLv2
-+ *
-+ */
-+
-+#include <linux/kobject.h>
-+#include <linux/device.h>
-+
-+#include "base.h"
-+
-+decl_subsys(hypervisor, NULL, NULL);
-+EXPORT_SYMBOL_GPL(hypervisor_subsys);
-+
-+int __init hypervisor_init(void)
-+{
-+ return subsystem_register(&hypervisor_subsys);
-+}
---- gregkh-2.6.orig/drivers/base/init.c
-+++ gregkh-2.6/drivers/base/init.c
-@@ -27,6 +27,7 @@ void __init driver_init(void)
- buses_init();
- classes_init();
- firmware_init();
-+ hypervisor_init();
-
- /* These are also core pieces, but must come after the
- * core core pieces.
---- gregkh-2.6.orig/include/linux/kobject.h
-+++ gregkh-2.6/include/linux/kobject.h
-@@ -190,6 +190,8 @@ struct subsystem _varname##_subsys = { \
-
- /* The global /sys/kernel/ subsystem for people to chain off of */
- extern struct subsystem kernel_subsys;
-+/* The global /sys/hypervisor/ subsystem */
-+extern struct subsystem hypervisor_subsys;
-
- /**
- * Helpers for setting the kset of registered objects.
diff --git a/driver/driver-core-allow-sysdev_class-have-attributes.patch b/driver/driver-core-allow-sysdev_class-have-attributes.patch
deleted file mode 100644
index 690886816fe46..0000000000000
--- a/driver/driver-core-allow-sysdev_class-have-attributes.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-From shaohua.li@intel.com Sun May 7 22:47:29 2006
-Subject: Driver Core: Allow sysdev_class have attributes
-From: Shaohua Li <shaohua.li@intel.com>
-Cc: Greg <greg@kroah.com>, Patrick Mochel <mochel@linux.intel.com>, Ashok Raj <ashok.raj@intel.com>, Andrew Morton <akpm@osdl.org>
-Date: Mon, 08 May 2006 13:45:57 +0800
-Message-Id: <1147067157.2760.89.camel@sli10-desk.sh.intel.com>
-
-
-allow sysdev_class adding attribute. Next patch will use the new API to
-add an attribute under /sys/device/system/cpu/.
-
-Signed-off-by: Shaohua Li <shaohua.li@intel.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/base/sys.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++++-
- include/linux/sysdev.h | 18 ++++++++++++++++-
- 2 files changed, 67 insertions(+), 2 deletions(-)
-
---- gregkh-2.6.orig/drivers/base/sys.c
-+++ gregkh-2.6/drivers/base/sys.c
-@@ -80,10 +80,59 @@ void sysdev_remove_file(struct sys_devic
- EXPORT_SYMBOL_GPL(sysdev_create_file);
- EXPORT_SYMBOL_GPL(sysdev_remove_file);
-
-+#define to_sysdev_class(k) container_of(k, struct sysdev_class, kset.kobj)
-+#define to_sysdev_class_attr(a) container_of(a, \
-+ struct sysdev_class_attribute, attr)
-+
-+static ssize_t sysdev_class_show(struct kobject *kobj, struct attribute *attr,
-+ char *buffer)
-+{
-+ struct sysdev_class * class = to_sysdev_class(kobj);
-+ struct sysdev_class_attribute *class_attr = to_sysdev_class_attr(attr);
-+
-+ if (class_attr->show)
-+ return class_attr->show(class, buffer);
-+ return -EIO;
-+}
-+
-+static ssize_t sysdev_class_store(struct kobject *kobj, struct attribute *attr,
-+ const char *buffer, size_t count)
-+{
-+ struct sysdev_class * class = to_sysdev_class(kobj);
-+ struct sysdev_class_attribute * class_attr = to_sysdev_class_attr(attr);
-+
-+ if (class_attr->store)
-+ return class_attr->store(class, buffer, count);
-+ return -EIO;
-+}
-+
-+static struct sysfs_ops sysfs_class_ops = {
-+ .show = sysdev_class_show,
-+ .store = sysdev_class_store,
-+};
-+
-+static struct kobj_type ktype_sysdev_class = {
-+ .sysfs_ops = &sysfs_class_ops,
-+};
-+
-+int sysdev_class_create_file(struct sysdev_class *c,
-+ struct sysdev_class_attribute *a)
-+{
-+ return sysfs_create_file(&c->kset.kobj, &a->attr);
-+}
-+EXPORT_SYMBOL_GPL(sysdev_class_create_file);
-+
-+void sysdev_class_remove_file(struct sysdev_class *c,
-+ struct sysdev_class_attribute *a)
-+{
-+ sysfs_remove_file(&c->kset.kobj, &a->attr);
-+}
-+EXPORT_SYMBOL_GPL(sysdev_class_remove_file);
-+
- /*
- * declare system_subsys
- */
--static decl_subsys(system, &ktype_sysdev, NULL);
-+static decl_subsys(system, &ktype_sysdev_class, NULL);
-
- int sysdev_class_register(struct sysdev_class * cls)
- {
---- gregkh-2.6.orig/include/linux/sysdev.h
-+++ gregkh-2.6/include/linux/sysdev.h
-@@ -37,11 +37,27 @@ struct sysdev_class {
- struct kset kset;
- };
-
-+struct sysdev_class_attribute {
-+ struct attribute attr;
-+ ssize_t (*show)(struct sysdev_class *, char *);
-+ ssize_t (*store)(struct sysdev_class *, const char *, size_t);
-+};
-+
-+#define SYSDEV_CLASS_ATTR(_name,_mode,_show,_store) \
-+struct sysdev_class_attribute attr_##_name = { \
-+ .attr = {.name = __stringify(_name), .mode = _mode }, \
-+ .show = _show, \
-+ .store = _store, \
-+};
-+
-
- extern int sysdev_class_register(struct sysdev_class *);
- extern void sysdev_class_unregister(struct sysdev_class *);
-
--
-+extern int sysdev_class_create_file(struct sysdev_class *,
-+ struct sysdev_class_attribute *);
-+extern void sysdev_class_remove_file(struct sysdev_class *,
-+ struct sysdev_class_attribute *);
- /**
- * Auxillary system device drivers.
- */
diff --git a/driver/driver-core-bus-device-event-delay.patch b/driver/driver-core-bus-device-event-delay.patch
deleted file mode 100644
index 0d2e22a2038b9..0000000000000
--- a/driver/driver-core-bus-device-event-delay.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-From kay.sievers@vrfy.org Thu Apr 6 09:46:15 2006
-Date: Tue, 4 Apr 2006 20:42:26 +0200
-From: Kay Sievers <kay.sievers@vrfy.org>
-To: Greg KH <greg@kroah.com>
-Subject: Driver core: bus device event delay
-Message-ID: <20060404184226.GA7578@vrfy.org>
-Content-Disposition: inline
-
-From: Kay Sievers <kay.sievers@suse.de>
-
-split bus_add_device() and send device uevents after sysfs population
-
-Signed-off-by: Kay Sievers <kay.sievers@suse.de>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/base/base.h | 1 +
- drivers/base/bus.c | 22 ++++++++++++++++++----
- drivers/base/core.c | 3 ++-
- 3 files changed, 21 insertions(+), 5 deletions(-)
-
---- gregkh-2.6.orig/drivers/base/base.h
-+++ gregkh-2.6/drivers/base/base.h
-@@ -11,6 +11,7 @@ extern int cpu_dev_init(void);
- extern int attribute_container_init(void);
-
- extern int bus_add_device(struct device * dev);
-+extern void bus_attach_device(struct device * dev);
- extern void bus_remove_device(struct device * dev);
-
- extern int bus_add_driver(struct device_driver *);
---- gregkh-2.6.orig/drivers/base/bus.c
-+++ gregkh-2.6/drivers/base/bus.c
-@@ -362,8 +362,7 @@ static void device_remove_attrs(struct b
- * @dev: device being added
- *
- * - Add the device to its bus's list of devices.
-- * - Try to attach to driver.
-- * - Create link to device's physical location.
-+ * - Create link to device's bus.
- */
- int bus_add_device(struct device * dev)
- {
-@@ -372,8 +371,6 @@ int bus_add_device(struct device * dev)
-
- if (bus) {
- pr_debug("bus %s: add device %s\n", bus->name, dev->bus_id);
-- device_attach(dev);
-- klist_add_tail(&dev->knode_bus, &bus->klist_devices);
- error = device_add_attrs(bus, dev);
- if (!error) {
- sysfs_create_link(&bus->devices.kobj, &dev->kobj, dev->bus_id);
-@@ -384,6 +381,22 @@ int bus_add_device(struct device * dev)
- }
-
- /**
-+ * bus_attach_device - add device to bus
-+ * @dev: device tried to attach to a driver
-+ *
-+ * - Try to attach to driver.
-+ */
-+void bus_attach_device(struct device * dev)
-+{
-+ struct bus_type * bus = dev->bus;
-+
-+ if (bus) {
-+ device_attach(dev);
-+ klist_add_tail(&dev->knode_bus, &bus->klist_devices);
-+ }
-+}
-+
-+/**
- * bus_remove_device - remove device from bus
- * @dev: device to be removed
- *
-@@ -733,6 +746,7 @@ EXPORT_SYMBOL_GPL(bus_find_device);
- EXPORT_SYMBOL_GPL(bus_for_each_drv);
-
- EXPORT_SYMBOL_GPL(bus_add_device);
-+EXPORT_SYMBOL_GPL(bus_attach_device);
- EXPORT_SYMBOL_GPL(bus_remove_device);
- EXPORT_SYMBOL_GPL(bus_register);
- EXPORT_SYMBOL_GPL(bus_unregister);
---- gregkh-2.6.orig/drivers/base/core.c
-+++ gregkh-2.6/drivers/base/core.c
-@@ -274,11 +274,12 @@ int device_add(struct device *dev)
- dev->uevent_attr.store = store_uevent;
- device_create_file(dev, &dev->uevent_attr);
-
-- kobject_uevent(&dev->kobj, KOBJ_ADD);
- if ((error = device_pm_add(dev)))
- goto PMError;
- if ((error = bus_add_device(dev)))
- goto BusError;
-+ kobject_uevent(&dev->kobj, KOBJ_ADD);
-+ bus_attach_device(dev);
- if (parent)
- klist_add_tail(&dev->knode_parent, &parent->klist_children);
-
diff --git a/driver/driver-core-class_device_add-needs-error-checks.patch b/driver/driver-core-class_device_add-needs-error-checks.patch
deleted file mode 100644
index b88c218df8086..0000000000000
--- a/driver/driver-core-class_device_add-needs-error-checks.patch
+++ /dev/null
@@ -1,147 +0,0 @@
-From shemminger@osdl.org Wed Apr 26 09:53:19 2006
-Date: Wed, 26 Apr 2006 09:53:14 -0700
-From: Stephen Hemminger <shemminger@osdl.org>
-To: Greg KH <greg@kroah.com>
-Subject: Driver core: class_device_add needs error checks
-Message-ID: <20060426095314.21fdd490@localhost.localdomain>
-
-class_device_add needs to check the return value of all the setup it
-does. It doesn't handle out of memory well. This is not complete, probably
-more needs to be done.
-
-Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/base/class.c | 72 ++++++++++++++++++++++++++++++++++++++-------------
- 1 file changed, 54 insertions(+), 18 deletions(-)
-
---- gregkh-2.6.orig/drivers/base/class.c
-+++ gregkh-2.6/drivers/base/class.c
-@@ -535,18 +535,22 @@ int class_device_add(struct class_device
- return -EINVAL;
-
- if (!strlen(class_dev->class_id))
-- goto register_done;
-+ goto out1;
-
- parent_class = class_get(class_dev->class);
- if (!parent_class)
-- goto register_done;
-+ goto out1;
-+
- parent_class_dev = class_device_get(class_dev->parent);
-
- pr_debug("CLASS: registering class device: ID = '%s'\n",
- class_dev->class_id);
-
- /* first, register with generic layer. */
-- kobject_set_name(&class_dev->kobj, "%s", class_dev->class_id);
-+ error = kobject_set_name(&class_dev->kobj, "%s", class_dev->class_id);
-+ if (error)
-+ goto out2;
-+
- if (parent_class_dev)
- class_dev->kobj.parent = &parent_class_dev->kobj;
- else
-@@ -554,41 +558,56 @@ int class_device_add(struct class_device
-
- error = kobject_add(&class_dev->kobj);
- if (error)
-- goto register_done;
-+ goto out2;
-
- /* add the needed attributes to this device */
- class_dev->uevent_attr.attr.name = "uevent";
- class_dev->uevent_attr.attr.mode = S_IWUSR;
- class_dev->uevent_attr.attr.owner = parent_class->owner;
- class_dev->uevent_attr.store = store_uevent;
-- class_device_create_file(class_dev, &class_dev->uevent_attr);
-+ error = class_device_create_file(class_dev, &class_dev->uevent_attr);
-+ if (error)
-+ goto out3;
-
- if (MAJOR(class_dev->devt)) {
- struct class_device_attribute *attr;
- attr = kzalloc(sizeof(*attr), GFP_KERNEL);
- if (!attr) {
- error = -ENOMEM;
-- kobject_del(&class_dev->kobj);
-- goto register_done;
-+ goto out4;
- }
- attr->attr.name = "dev";
- attr->attr.mode = S_IRUGO;
- attr->attr.owner = parent_class->owner;
- attr->show = show_dev;
-- class_device_create_file(class_dev, attr);
-+ error = class_device_create_file(class_dev, attr);
-+ if (error) {
-+ kfree(attr);
-+ goto out4;
-+ }
-+
- class_dev->devt_attr = attr;
- }
-
-- class_device_add_attrs(class_dev);
-+ error = class_device_add_attrs(class_dev);
-+ if (error)
-+ goto out5;
-+
- if (class_dev->dev) {
- class_name = make_class_name(class_dev);
-- sysfs_create_link(&class_dev->kobj,
-- &class_dev->dev->kobj, "device");
-- sysfs_create_link(&class_dev->dev->kobj, &class_dev->kobj,
-- class_name);
-+ error = sysfs_create_link(&class_dev->kobj,
-+ &class_dev->dev->kobj, "device");
-+ if (error)
-+ goto out6;
-+ error = sysfs_create_link(&class_dev->dev->kobj, &class_dev->kobj,
-+ class_name);
-+ if (error)
-+ goto out7;
- }
-
-- class_device_add_groups(class_dev);
-+ error = class_device_add_groups(class_dev);
-+ if (error)
-+ goto out8;
-
- kobject_uevent(&class_dev->kobj, KOBJ_ADD);
-
-@@ -601,11 +620,28 @@ int class_device_add(struct class_device
- }
- up(&parent_class->sem);
-
-- register_done:
-- if (error) {
-- class_put(parent_class);
-+ goto out1;
-+
-+ out8:
-+ if (class_dev->dev)
-+ sysfs_remove_link(&class_dev->kobj, class_name);
-+ out7:
-+ if (class_dev->dev)
-+ sysfs_remove_link(&class_dev->kobj, "device");
-+ out6:
-+ class_device_remove_attrs(class_dev);
-+ out5:
-+ if (class_dev->devt_attr)
-+ class_device_remove_file(class_dev, class_dev->devt_attr);
-+ out4:
-+ class_device_remove_file(class_dev, &class_dev->uevent_attr);
-+ out3:
-+ kobject_del(&class_dev->kobj);
-+ out2:
-+ if(parent_class_dev)
- class_device_put(parent_class_dev);
-- }
-+ class_put(parent_class);
-+ out1:
- class_device_put(class_dev);
- kfree(class_name);
- return error;
diff --git a/driver/driver-core-config_debug_pm-covers-drivers-base-power-too.patch b/driver/driver-core-config_debug_pm-covers-drivers-base-power-too.patch
deleted file mode 100644
index 87e4dc1681512..0000000000000
--- a/driver/driver-core-config_debug_pm-covers-drivers-base-power-too.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From david-b@pacbell.net Mon May 1 14:05:11 2006
-From: David Brownell <david-b@pacbell.net>
-To: Greg KH <greg@kroah.com>
-Subject: Driver Core: CONFIG_DEBUG_PM covers drivers/base/power too
-Date: Mon, 1 May 2006 13:58:33 -0700
-Message-Id: <200605011358.33927.david-b@pacbell.net>
-
-The drivers/base/power PM debug messages should appear when
-either PM or driver model debug are enabled.
-
-Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/base/power/Makefile | 3 +++
- 1 file changed, 3 insertions(+)
-
---- gregkh-2.6.orig/drivers/base/power/Makefile
-+++ gregkh-2.6/drivers/base/power/Makefile
-@@ -4,3 +4,6 @@ obj-$(CONFIG_PM) += main.o suspend.o res
- ifeq ($(CONFIG_DEBUG_DRIVER),y)
- EXTRA_CFLAGS += -DDEBUG
- endif
-+ifeq ($(CONFIG_PM_DEBUG),y)
-+EXTRA_CFLAGS += -DDEBUG
-+endif
diff --git a/driver/driver-core-fix-platform_device_add-to-use-device_add.patch b/driver/driver-core-fix-platform_device_add-to-use-device_add.patch
deleted file mode 100644
index 5b134d9a44734..0000000000000
--- a/driver/driver-core-fix-platform_device_add-to-use-device_add.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From rmk+gregkh=suse.de@arm.linux.org.uk Sat May 6 00:15:45 2006
-Date: Sat, 6 May 2006 08:15:26 +0100
-From: Russell King <rmk+lkml@arm.linux.org.uk>
-To: Andrew Morton <akpm@osdl.org>, Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>, gregkh@suse.de
-Subject: Driver Core: Fix platform_device_add to use device_add
-Message-ID: <20060506071526.GC18829@flint.arm.linux.org.uk>
-Content-Disposition: inline
-
-platform_device_add() should be using device_add() rather
-than device_register() - any platform device passed to
-platform_device_add() should have already been initialised,
-either by platform_device_alloc() or platform_device_register().
-
-Signed-off-by: Russell King <rmk@arm.linux.org.uk>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/base/platform.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- gregkh-2.6.orig/drivers/base/platform.c
-+++ gregkh-2.6/drivers/base/platform.c
-@@ -275,7 +275,7 @@ int platform_device_add(struct platform_
- pr_debug("Registering platform device '%s'. Parent at %s\n",
- pdev->dev.bus_id, pdev->dev.parent->bus_id);
-
-- ret = device_register(&pdev->dev);
-+ ret = device_add(&pdev->dev);
- if (ret == 0)
- return ret;
-
diff --git a/driver/driver-core-make-dev_info-and-friends-print-the-bus-name-if-there-is-no-driver.patch b/driver/driver-core-make-dev_info-and-friends-print-the-bus-name-if-there-is-no-driver.patch
deleted file mode 100644
index 515096582b3fd..0000000000000
--- a/driver/driver-core-make-dev_info-and-friends-print-the-bus-name-if-there-is-no-driver.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From stern@rowland.harvard.edu Fri Jun 16 14:11:07 2006
-Date: Fri, 16 Jun 2006 17:10:48 -0400 (EDT)
-From: Alan Stern <stern@rowland.harvard.edu>
-To: Greg KH <greg@kroah.com>
-Subject: Driver Core: Make dev_info and friends print the bus name if there is no driver
-Message-ID: <Pine.LNX.4.44L0.0606161704460.6004-100000@iolanthe.rowland.org>
-
-This patch (as721) makes dev_info and related macros print the device's
-bus name if the device doesn't have a driver, instead of printing just a
-blank. If the device isn't on a bus either... well, then it does leave
-a blank space. But it will be easier for someone else to change if they
-want.
-
-Cc: Matthew Wilcox <matthew@wil.cx>
-Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/base/core.c | 16 ++++++++++++++++
- include/linux/device.h | 3 ++-
- 2 files changed, 18 insertions(+), 1 deletion(-)
-
---- gregkh-2.6.orig/drivers/base/core.c
-+++ gregkh-2.6/drivers/base/core.c
-@@ -29,6 +29,22 @@ int (*platform_notify_remove)(struct dev
- * sysfs bindings for devices.
- */
-
-+/**
-+ * dev_driver_string - Return a device's driver name, if at all possible
-+ * @dev: struct device to get the name of
-+ *
-+ * Will return the device's driver's name if it is bound to a device. If
-+ * the device is not bound to a device, it will return the name of the bus
-+ * it is attached to. If it is not attached to a bus either, an empty
-+ * string will be returned.
-+ */
-+const char *dev_driver_string(struct device *dev)
-+{
-+ return dev->driver ? dev->driver->name :
-+ (dev->bus ? dev->bus->name : "");
-+}
-+EXPORT_SYMBOL_GPL(dev_driver_string);
-+
- #define to_dev(obj) container_of(obj, struct device, kobj)
- #define to_dev_attr(_attr) container_of(_attr, struct device_attribute, attr)
-
---- gregkh-2.6.orig/include/linux/device.h
-+++ gregkh-2.6/include/linux/device.h
-@@ -416,8 +416,9 @@ extern int firmware_register(struct subs
- extern void firmware_unregister(struct subsystem *);
-
- /* debugging and troubleshooting/diagnostic helpers. */
-+extern const char *dev_driver_string(struct device *dev);
- #define dev_printk(level, dev, format, arg...) \
-- printk(level "%s %s: " format , (dev)->driver ? (dev)->driver->name : "" , (dev)->bus_id , ## arg)
-+ printk(level "%s %s: " format , dev_driver_string(dev) , (dev)->bus_id , ## arg)
-
- #ifdef DEBUG
- #define dev_dbg(dev, format, arg...) \
diff --git a/driver/driver-core-pm_debug-device-suspend-messages-become-informative.patch b/driver/driver-core-pm_debug-device-suspend-messages-become-informative.patch
deleted file mode 100644
index 3e42f2989f07b..0000000000000
--- a/driver/driver-core-pm_debug-device-suspend-messages-become-informative.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From david-b@pacbell.net Tue May 16 17:42:31 2006
-From: David Brownell <david-b@pacbell.net>
-To: Greg KH <greg@kroah.com>
-Subject: Driver core: PM_DEBUG device suspend() messages become informative
-Date: Tue, 16 May 2006 17:03:25 -0700
-Cc: linux-pm@lists.osdl.org
-Message-Id: <200605161703.26678.david-b@pacbell.net>
-
-This makes the driver model PM suspend debug messages more useful, by
-
- (a) explaining what event is being sent, since not all suspend()
- requests mean the same thing;
-
- (b) reporting when a PM_EVENT_SUSPEND call is allowing the device
- to issue wakeup events.
-
-Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/base/power/suspend.c | 17 ++++++++++++++++-
- 1 file changed, 16 insertions(+), 1 deletion(-)
-
---- gregkh-2.6.orig/drivers/base/power/suspend.c
-+++ gregkh-2.6/drivers/base/power/suspend.c
-@@ -29,6 +29,15 @@
- * lists. This way, the ancestors will be accessed before their descendents.
- */
-
-+static inline char *suspend_verb(u32 event)
-+{
-+ switch (event) {
-+ case PM_EVENT_SUSPEND: return "suspend";
-+ case PM_EVENT_FREEZE: return "freeze";
-+ default: return "(unknown suspend event)";
-+ }
-+}
-+
-
- /**
- * suspend_device - Save state of one device.
-@@ -57,7 +66,13 @@ int suspend_device(struct device * dev,
- dev->power.prev_state = dev->power.power_state;
-
- if (dev->bus && dev->bus->suspend && !dev->power.power_state.event) {
-- dev_dbg(dev, "suspending\n");
-+ dev_dbg(dev, "%s%s\n",
-+ suspend_verb(state.event),
-+ ((state.event == PM_EVENT_SUSPEND)
-+ && device_may_wakeup(dev))
-+ ? ", may wakeup"
-+ : ""
-+ );
- error = dev->bus->suspend(dev, state);
- suspend_report_result(dev->bus->suspend, error);
- }
diff --git a/driver/driver-core-remove-exports.patch b/driver/driver-core-remove-exports.patch
deleted file mode 100644
index 95606badcdf81..0000000000000
--- a/driver/driver-core-remove-exports.patch
+++ /dev/null
@@ -1,164 +0,0 @@
-From foo@baz Tue Apr 9 12:12:43 2002
-Date: Tue, 02 May 2006 16:59:59 +0200
-To: Greg KH <greg@kroah.com>
-From: Greg Kroah-Hartman <gregkh@suse.de>
-Subject: Driver Core: remove unused exports
-
-Cc: Arjan van de Ven <arjan@linux.intel.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/base/attribute_container.c | 8 --------
- drivers/base/base.h | 2 ++
- drivers/base/bus.c | 6 ------
- drivers/base/class.c | 6 ++----
- include/linux/device.h | 8 --------
- 5 files changed, 4 insertions(+), 26 deletions(-)
-
---- gregkh-2.6.orig/drivers/base/attribute_container.c
-+++ gregkh-2.6/drivers/base/attribute_container.c
-@@ -236,7 +236,6 @@ attribute_container_remove_device(struct
- }
- up(&attribute_container_mutex);
- }
--EXPORT_SYMBOL_GPL(attribute_container_remove_device);
-
- /**
- * attribute_container_device_trigger - execute a trigger for each matching classdev
-@@ -276,7 +275,6 @@ attribute_container_device_trigger(struc
- }
- up(&attribute_container_mutex);
- }
--EXPORT_SYMBOL_GPL(attribute_container_device_trigger);
-
- /**
- * attribute_container_trigger - trigger a function for each matching container
-@@ -304,7 +302,6 @@ attribute_container_trigger(struct devic
- }
- up(&attribute_container_mutex);
- }
--EXPORT_SYMBOL_GPL(attribute_container_trigger);
-
- /**
- * attribute_container_add_attrs - add attributes
-@@ -333,7 +330,6 @@ attribute_container_add_attrs(struct cla
-
- return 0;
- }
--EXPORT_SYMBOL_GPL(attribute_container_add_attrs);
-
- /**
- * attribute_container_add_class_device - same function as class_device_add
-@@ -352,7 +348,6 @@ attribute_container_add_class_device(str
- return error;
- return attribute_container_add_attrs(classdev);
- }
--EXPORT_SYMBOL_GPL(attribute_container_add_class_device);
-
- /**
- * attribute_container_add_class_device_adapter - simple adapter for triggers
-@@ -367,7 +362,6 @@ attribute_container_add_class_device_ada
- {
- return attribute_container_add_class_device(classdev);
- }
--EXPORT_SYMBOL_GPL(attribute_container_add_class_device_adapter);
-
- /**
- * attribute_container_remove_attrs - remove any attribute files
-@@ -389,7 +383,6 @@ attribute_container_remove_attrs(struct
- for (i = 0; attrs[i]; i++)
- class_device_remove_file(classdev, attrs[i]);
- }
--EXPORT_SYMBOL_GPL(attribute_container_remove_attrs);
-
- /**
- * attribute_container_class_device_del - equivalent of class_device_del
-@@ -405,7 +398,6 @@ attribute_container_class_device_del(str
- attribute_container_remove_attrs(classdev);
- class_device_del(classdev);
- }
--EXPORT_SYMBOL_GPL(attribute_container_class_device_del);
-
- /**
- * attribute_container_find_class_device - find the corresponding class_device
---- gregkh-2.6.orig/drivers/base/base.h
-+++ gregkh-2.6/drivers/base/base.h
-@@ -13,6 +13,8 @@ extern int attribute_container_init(void
- extern int bus_add_device(struct device * dev);
- extern void bus_attach_device(struct device * dev);
- extern void bus_remove_device(struct device * dev);
-+extern struct bus_type *get_bus(struct bus_type * bus);
-+extern void put_bus(struct bus_type * bus);
-
- extern int bus_add_driver(struct device_driver *);
- extern void bus_remove_driver(struct device_driver *);
---- gregkh-2.6.orig/drivers/base/bus.c
-+++ gregkh-2.6/drivers/base/bus.c
-@@ -745,15 +745,9 @@ EXPORT_SYMBOL_GPL(bus_for_each_dev);
- EXPORT_SYMBOL_GPL(bus_find_device);
- EXPORT_SYMBOL_GPL(bus_for_each_drv);
-
--EXPORT_SYMBOL_GPL(bus_add_device);
--EXPORT_SYMBOL_GPL(bus_attach_device);
--EXPORT_SYMBOL_GPL(bus_remove_device);
- EXPORT_SYMBOL_GPL(bus_register);
- EXPORT_SYMBOL_GPL(bus_unregister);
- EXPORT_SYMBOL_GPL(bus_rescan_devices);
--EXPORT_SYMBOL_GPL(get_bus);
--EXPORT_SYMBOL_GPL(put_bus);
--EXPORT_SYMBOL_GPL(find_bus);
-
- EXPORT_SYMBOL_GPL(bus_create_file);
- EXPORT_SYMBOL_GPL(bus_remove_file);
---- gregkh-2.6.orig/drivers/base/class.c
-+++ gregkh-2.6/drivers/base/class.c
-@@ -91,14 +91,14 @@ void class_remove_file(struct class * cl
- sysfs_remove_file(&cls->subsys.kset.kobj, &attr->attr);
- }
-
--struct class * class_get(struct class * cls)
-+static struct class *class_get(struct class *cls)
- {
- if (cls)
- return container_of(subsys_get(&cls->subsys), struct class, subsys);
- return NULL;
- }
-
--void class_put(struct class * cls)
-+static void class_put(struct class * cls)
- {
- if (cls)
- subsys_put(&cls->subsys);
-@@ -894,8 +894,6 @@ EXPORT_SYMBOL_GPL(class_create_file);
- EXPORT_SYMBOL_GPL(class_remove_file);
- EXPORT_SYMBOL_GPL(class_register);
- EXPORT_SYMBOL_GPL(class_unregister);
--EXPORT_SYMBOL_GPL(class_get);
--EXPORT_SYMBOL_GPL(class_put);
- EXPORT_SYMBOL_GPL(class_create);
- EXPORT_SYMBOL_GPL(class_destroy);
-
---- gregkh-2.6.orig/include/linux/device.h
-+++ gregkh-2.6/include/linux/device.h
-@@ -60,11 +60,6 @@ extern void bus_unregister(struct bus_ty
-
- extern void bus_rescan_devices(struct bus_type * bus);
-
--extern struct bus_type * get_bus(struct bus_type * bus);
--extern void put_bus(struct bus_type * bus);
--
--extern struct bus_type * find_bus(char * name);
--
- /* iterator helpers for buses */
-
- int bus_for_each_dev(struct bus_type * bus, struct device * start, void * data,
-@@ -163,9 +158,6 @@ struct class {
- extern int class_register(struct class *);
- extern void class_unregister(struct class *);
-
--extern struct class * class_get(struct class *);
--extern void class_put(struct class *);
--
-
- struct class_attribute {
- struct attribute attr;
diff --git a/driver/driver-model-add-isa-bus.patch b/driver/driver-model-add-isa-bus.patch
deleted file mode 100644
index ca7366cc0cf93..0000000000000
--- a/driver/driver-model-add-isa-bus.patch
+++ /dev/null
@@ -1,373 +0,0 @@
-From rene.herman@keyaccess.nl Tue Jun 6 14:54:03 2006
-Message-ID: <4485F97A.6020205@keyaccess.nl>
-Date: Tue, 06 Jun 2006 23:54:02 +0200
-From: Rene Herman <rene.herman@keyaccess.nl>
-To: Greg Kroah-Hartman <gregkh@suse.de>
-Cc: Takashi Iwai <tiwai@suse.de>, Jaroslav Kysela <perex@suse.cz>
-Subject: Driver model: add ISA bus
-
-
-During the recent "isa drivers using platform devices" discussion it was
-pointed out that (ALSA) ISA drivers ran into the problem of not having
-the option to fail driver load (device registration rather) upon not
-finding their hardware due to a probe() error not being passed up
-through the driver model. In the course of that, I suggested a seperate
-ISA bus might be best; Russell King agreed and suggested this bus could
-use the .match() method for the actual device discovery.
-
-The attached does this. For this old non (generically) discoverable ISA
-hardware only the driver itself can do discovery so as a difference with
-the platform_bus, this isa_bus also distributes match() up to the driver.
-
-As another difference: these devices only exist in the driver model due
-to the driver creating them because it might want to drive them, meaning
-that all device creation has been made internal as well.
-
-The usage model this provides is nice, and has been acked from the ALSA
-side by Takashi Iwai and Jaroslav Kysela. The ALSA driver module_init's
-now (for oldisa-only drivers) become:
-
-static int __init alsa_card_foo_init(void)
-{
- return isa_register_driver(&snd_foo_isa_driver, SNDRV_CARDS);
-}
-
-static void __exit alsa_card_foo_exit(void)
-{
- isa_unregister_driver(&snd_foo_isa_driver);
-}
-
-Quite like the other bus models therefore. This removes a lot of
-duplicated init code from the ALSA ISA drivers.
-
-The passed in isa_driver struct is the regular driver struct embedding a
-struct device_driver, the normal probe/remove/shutdown/suspend/resume
-callbacks, and as indicated that .match callback.
-
-The "SNDRV_CARDS" you see being passed in is a "unsigned int ndev"
-parameter, indicating how many devices to create and call our methods with.
-
-The platform_driver callbacks are called with a platform_device param;
-the isa_driver callbacks are being called with a "struct device *dev,
-unsigned int id" pair directly -- with the device creation completely
-internal to the bus it's much cleaner to not leak isa_dev's by passing
-them in at all. The id is the only thing we ever want other then the
-struct device * anyways, and it makes for nicer code in the callbacks as
-well.
-
-With this additional .match() callback ISA drivers have all options. If
-ALSA would want to keep the old non-load behaviour, it could stick all
-of the old .probe in .match, which would only keep them registered after
-everything was found to be present and accounted for. If it wanted the
-behaviour of always loading as it inadvertently did for a bit after the
-changeover to platform devices, it could just not provide a .match() and
-do everything in .probe() as before.
-
-If it, as Takashi Iwai already suggested earlier as a way of following
-the model from saner buses more closely, wants to load when a later bind
-could conceivably succeed, it could use .match() for the prerequisites
-(such as checking the user wants the card enabled and that port/irq/dma
-values have been passed in) and .probe() for everything else. This is
-the nicest model.
-
-To the code...
-
-This exports only two functions; isa_{,un}register_driver().
-
-isa_register_driver() register's the struct device_driver, and then
-loops over the passed in ndev creating devices and registering them.
-This causes the bus match method to be called for them, which is:
-
-int isa_bus_match(struct device *dev, struct device_driver *driver)
-{
- struct isa_driver *isa_driver = to_isa_driver(driver);
-
- if (dev->platform_data == isa_driver) {
- if (!isa_driver->match ||
- isa_driver->match(dev, to_isa_dev(dev)->id))
- return 1;
- dev->platform_data = NULL;
- }
- return 0;
-}
-
-The first thing this does is check if this device is in fact one of this
-driver's devices by seeing if the device's platform_data pointer is set
-to this driver. Platform devices compare strings, but we don't need to
-do that with everything being internal, so isa_register_driver() abuses
-dev->platform_data as a isa_driver pointer which we can then check here.
-I believe platform_data is available for this, but if rather not, moving
-the isa_driver pointer to the private struct isa_dev is ofcourse fine as
-well.
-
-Then, if the the driver did not provide a .match, it matches. If it did,
-the driver match() method is called to determine a match.
-
-If it did _not_ match, dev->platform_data is reset to indicate this to
-isa_register_driver which can then unregister the device again.
-
-If during all this, there's any error, or no devices matched at all
-everything is backed out again and the error, or -ENODEV, is returned.
-
-isa_unregister_driver() just unregisters the matched devices and the
-driver itself.
-
-More global points/questions...
-
-- I'm introducing include/linux/isa.h. It was available but is ofcourse
-a somewhat generic name. Moving more isa stuff over to it in time is
-ofcourse fine, so can I have it please? :)
-
-- I'm using device_initcall() and added the isa.o (dependent on
-CONFIG_ISA) after the base driver model things in the Makefile. Will
-this do, or I really need to stick it in drivers/base/init.c, inside
-#ifdef CONFIG_ISA? It's working fine.
-
-Lastly -- I also looked, a bit, into integrating with PnP. "Old ISA"
-could be another pnp_protocol, but this does not seem to be a good
-match, largely due to the same reason platform_devices weren't -- the
-devices do not have a life of their own outside the driver, meaning the
-pnp_protocol {get,set}_resources callbacks would need to callback into
-driver -- which again means you first need to _have_ that driver. Even
-if there's clean way around that, you only end up inventing fake but
-valid-form PnP IDs and generally catering to the PnP layer without any
-practical advantages over this very simple isa_bus. The thing I also
-suggested earlier about the user echoing values into /sys to set up the
-hardware from userspace first is... well, cute, but a horrible idea from
-a user standpoint.
-
-Comments ofcourse appreciated. Hope it's okay. As said, the usage model
-is nice at least.
-
-Signed-off-by: Rene Herman <rene.herman@keyaccess.nl>
-
----
- drivers/base/Makefile | 1
- drivers/base/isa.c | 180 ++++++++++++++++++++++++++++++++++++++++++++++++++
- include/linux/isa.h | 28 +++++++
- 3 files changed, 209 insertions(+)
-
---- gregkh-2.6.orig/drivers/base/Makefile
-+++ gregkh-2.6/drivers/base/Makefile
-@@ -5,6 +5,7 @@ obj-y := core.o sys.o bus.o dd.o \
- cpu.o firmware.o init.o map.o dmapool.o \
- attribute_container.o transport_class.o
- obj-y += power/
-+obj-$(CONFIG_ISA) += isa.o
- obj-$(CONFIG_FW_LOADER) += firmware_class.o
- obj-$(CONFIG_NUMA) += node.o
- obj-$(CONFIG_MEMORY_HOTPLUG) += memory.o
---- /dev/null
-+++ gregkh-2.6/drivers/base/isa.c
-@@ -0,0 +1,180 @@
-+/*
-+ * ISA bus.
-+ */
-+
-+#include <linux/device.h>
-+#include <linux/kernel.h>
-+#include <linux/slab.h>
-+#include <linux/module.h>
-+#include <linux/init.h>
-+#include <linux/isa.h>
-+
-+static struct device isa_bus = {
-+ .bus_id = "isa"
-+};
-+
-+struct isa_dev {
-+ struct device dev;
-+ struct device *next;
-+ unsigned int id;
-+};
-+
-+#define to_isa_dev(x) container_of((x), struct isa_dev, dev)
-+
-+static int isa_bus_match(struct device *dev, struct device_driver *driver)
-+{
-+ struct isa_driver *isa_driver = to_isa_driver(driver);
-+
-+ if (dev->platform_data == isa_driver) {
-+ if (!isa_driver->match ||
-+ isa_driver->match(dev, to_isa_dev(dev)->id))
-+ return 1;
-+ dev->platform_data = NULL;
-+ }
-+ return 0;
-+}
-+
-+static int isa_bus_probe(struct device *dev)
-+{
-+ struct isa_driver *isa_driver = dev->platform_data;
-+
-+ if (isa_driver->probe)
-+ return isa_driver->probe(dev, to_isa_dev(dev)->id);
-+
-+ return 0;
-+}
-+
-+static int isa_bus_remove(struct device *dev)
-+{
-+ struct isa_driver *isa_driver = dev->platform_data;
-+
-+ if (isa_driver->remove)
-+ return isa_driver->remove(dev, to_isa_dev(dev)->id);
-+
-+ return 0;
-+}
-+
-+static void isa_bus_shutdown(struct device *dev)
-+{
-+ struct isa_driver *isa_driver = dev->platform_data;
-+
-+ if (isa_driver->shutdown)
-+ isa_driver->shutdown(dev, to_isa_dev(dev)->id);
-+}
-+
-+static int isa_bus_suspend(struct device *dev, pm_message_t state)
-+{
-+ struct isa_driver *isa_driver = dev->platform_data;
-+
-+ if (isa_driver->suspend)
-+ return isa_driver->suspend(dev, to_isa_dev(dev)->id, state);
-+
-+ return 0;
-+}
-+
-+static int isa_bus_resume(struct device *dev)
-+{
-+ struct isa_driver *isa_driver = dev->platform_data;
-+
-+ if (isa_driver->resume)
-+ return isa_driver->resume(dev, to_isa_dev(dev)->id);
-+
-+ return 0;
-+}
-+
-+static struct bus_type isa_bus_type = {
-+ .name = "isa",
-+ .match = isa_bus_match,
-+ .probe = isa_bus_probe,
-+ .remove = isa_bus_remove,
-+ .shutdown = isa_bus_shutdown,
-+ .suspend = isa_bus_suspend,
-+ .resume = isa_bus_resume
-+};
-+
-+static void isa_dev_release(struct device *dev)
-+{
-+ kfree(to_isa_dev(dev));
-+}
-+
-+void isa_unregister_driver(struct isa_driver *isa_driver)
-+{
-+ struct device *dev = isa_driver->devices;
-+
-+ while (dev) {
-+ struct device *tmp = to_isa_dev(dev)->next;
-+ device_unregister(dev);
-+ dev = tmp;
-+ }
-+ driver_unregister(&isa_driver->driver);
-+}
-+EXPORT_SYMBOL_GPL(isa_unregister_driver);
-+
-+int isa_register_driver(struct isa_driver *isa_driver, unsigned int ndev)
-+{
-+ int error;
-+ unsigned int id;
-+
-+ isa_driver->driver.bus = &isa_bus_type;
-+ isa_driver->devices = NULL;
-+
-+ error = driver_register(&isa_driver->driver);
-+ if (error)
-+ return error;
-+
-+ for (id = 0; id < ndev; id++) {
-+ struct isa_dev *isa_dev;
-+
-+ isa_dev = kzalloc(sizeof *isa_dev, GFP_KERNEL);
-+ if (!isa_dev) {
-+ error = -ENOMEM;
-+ break;
-+ }
-+
-+ isa_dev->dev.parent = &isa_bus;
-+ isa_dev->dev.bus = &isa_bus_type;
-+
-+ snprintf(isa_dev->dev.bus_id, BUS_ID_SIZE, "%s.%u",
-+ isa_driver->driver.name, id);
-+
-+ isa_dev->dev.platform_data = isa_driver;
-+ isa_dev->dev.release = isa_dev_release;
-+ isa_dev->id = id;
-+
-+ error = device_register(&isa_dev->dev);
-+ if (error) {
-+ put_device(&isa_dev->dev);
-+ break;
-+ }
-+
-+ if (isa_dev->dev.platform_data) {
-+ isa_dev->next = isa_driver->devices;
-+ isa_driver->devices = &isa_dev->dev;
-+ } else
-+ device_unregister(&isa_dev->dev);
-+ }
-+
-+ if (!error && !isa_driver->devices)
-+ error = -ENODEV;
-+
-+ if (error)
-+ isa_unregister_driver(isa_driver);
-+
-+ return error;
-+}
-+EXPORT_SYMBOL_GPL(isa_register_driver);
-+
-+static int __init isa_bus_init(void)
-+{
-+ int error;
-+
-+ error = bus_register(&isa_bus_type);
-+ if (!error) {
-+ error = device_register(&isa_bus);
-+ if (error)
-+ bus_unregister(&isa_bus_type);
-+ }
-+ return error;
-+}
-+
-+device_initcall(isa_bus_init);
---- /dev/null
-+++ gregkh-2.6/include/linux/isa.h
-@@ -0,0 +1,28 @@
-+/*
-+ * ISA bus.
-+ */
-+
-+#ifndef __LINUX_ISA_H
-+#define __LINUX_ISA_H
-+
-+#include <linux/device.h>
-+#include <linux/kernel.h>
-+
-+struct isa_driver {
-+ int (*match)(struct device *, unsigned int);
-+ int (*probe)(struct device *, unsigned int);
-+ int (*remove)(struct device *, unsigned int);
-+ void (*shutdown)(struct device *, unsigned int);
-+ int (*suspend)(struct device *, unsigned int, pm_message_t);
-+ int (*resume)(struct device *, unsigned int);
-+
-+ struct device_driver driver;
-+ struct device *devices;
-+};
-+
-+#define to_isa_driver(x) container_of((x), struct isa_driver, driver)
-+
-+int isa_register_driver(struct isa_driver *, unsigned int);
-+void isa_unregister_driver(struct isa_driver *);
-+
-+#endif /* __LINUX_ISA_H */
diff --git a/driver/firmware_class-s-semaphores-mutexes.patch b/driver/firmware_class-s-semaphores-mutexes.patch
deleted file mode 100644
index e48e1f11ae43d..0000000000000
--- a/driver/firmware_class-s-semaphores-mutexes.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-From linux-kernel-owner+greg=40kroah.com-S1751168AbWEWVWk@vger.kernel.org Tue May 23 14:24:32 2006
-Message-ID: <4a192fd60605231422i76361d3ag5ee650d012e8720c@mail.gmail.com>
-Date: Tue, 23 May 2006 23:22:38 +0200
-From: "Laura Garcia" <nevola@gmail.com>
-Subject: firmware_class: s/semaphores/mutexes
-Content-Disposition: inline
-
-Hi, this patch converts semaphores to mutexes for Randy's firmware_class.
-
-Signed-off-by: Laura Garcia Liebana <nevola@gmail.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/base/firmware_class.c | 22 +++++++++++-----------
- 1 file changed, 11 insertions(+), 11 deletions(-)
-
---- gregkh-2.6.orig/drivers/base/firmware_class.c
-+++ gregkh-2.6/drivers/base/firmware_class.c
-@@ -15,7 +15,7 @@
- #include <linux/vmalloc.h>
- #include <linux/interrupt.h>
- #include <linux/bitops.h>
--#include <asm/semaphore.h>
-+#include <linux/mutex.h>
-
- #include <linux/firmware.h>
- #include "base.h"
-@@ -36,7 +36,7 @@ static int loading_timeout = 10; /* In s
-
- /* fw_lock could be moved to 'struct firmware_priv' but since it is just
- * guarding for corner cases a global lock should be OK */
--static DECLARE_MUTEX(fw_lock);
-+static DEFINE_MUTEX(fw_lock);
-
- struct firmware_priv {
- char fw_id[FIRMWARE_NAME_MAX];
-@@ -142,9 +142,9 @@ firmware_loading_store(struct class_devi
-
- switch (loading) {
- case 1:
-- down(&fw_lock);
-+ mutex_lock(&fw_lock);
- if (!fw_priv->fw) {
-- up(&fw_lock);
-+ mutex_unlock(&fw_lock);
- break;
- }
- vfree(fw_priv->fw->data);
-@@ -152,7 +152,7 @@ firmware_loading_store(struct class_devi
- fw_priv->fw->size = 0;
- fw_priv->alloc_size = 0;
- set_bit(FW_STATUS_LOADING, &fw_priv->status);
-- up(&fw_lock);
-+ mutex_unlock(&fw_lock);
- break;
- case 0:
- if (test_bit(FW_STATUS_LOADING, &fw_priv->status)) {
-@@ -185,7 +185,7 @@ firmware_data_read(struct kobject *kobj,
- struct firmware *fw;
- ssize_t ret_count = count;
-
-- down(&fw_lock);
-+ mutex_lock(&fw_lock);
- fw = fw_priv->fw;
- if (!fw || test_bit(FW_STATUS_DONE, &fw_priv->status)) {
- ret_count = -ENODEV;
-@@ -200,7 +200,7 @@ firmware_data_read(struct kobject *kobj,
-
- memcpy(buffer, fw->data + offset, ret_count);
- out:
-- up(&fw_lock);
-+ mutex_unlock(&fw_lock);
- return ret_count;
- }
-
-@@ -253,7 +253,7 @@ firmware_data_write(struct kobject *kobj
- if (!capable(CAP_SYS_RAWIO))
- return -EPERM;
-
-- down(&fw_lock);
-+ mutex_lock(&fw_lock);
- fw = fw_priv->fw;
- if (!fw || test_bit(FW_STATUS_DONE, &fw_priv->status)) {
- retval = -ENODEV;
-@@ -268,7 +268,7 @@ firmware_data_write(struct kobject *kobj
- fw->size = max_t(size_t, offset + count, fw->size);
- retval = count;
- out:
-- up(&fw_lock);
-+ mutex_unlock(&fw_lock);
- return retval;
- }
-
-@@ -436,14 +436,14 @@ _request_firmware(const struct firmware
- } else
- wait_for_completion(&fw_priv->completion);
-
-- down(&fw_lock);
-+ mutex_lock(&fw_lock);
- if (!fw_priv->fw->size || test_bit(FW_STATUS_ABORT, &fw_priv->status)) {
- retval = -ENOENT;
- release_firmware(fw_priv->fw);
- *firmware_p = NULL;
- }
- fw_priv->fw = NULL;
-- up(&fw_lock);
-+ mutex_unlock(&fw_lock);
- class_device_unregister(class_dev);
- goto out;
-
diff --git a/driver/i4l-gigaset-move-sysfs-entry-to-tty-class-device.patch b/driver/i4l-gigaset-move-sysfs-entry-to-tty-class-device.patch
deleted file mode 100644
index 46f10dcf24ea5..0000000000000
--- a/driver/i4l-gigaset-move-sysfs-entry-to-tty-class-device.patch
+++ /dev/null
@@ -1,195 +0,0 @@
-From tilman@imap.cc Sat Apr 22 09:41:44 2006
-Message-ID: <444A5D14.7050804@imap.cc>
-Date: Sat, 22 Apr 2006 18:43:00 +0200
-From: Tilman Schmidt <tilman@imap.cc>
-To: Tilman Schmidt <tilman@imap.cc>
-Cc: Andrew Morton <akpm@osdl.org>, gregkh@suse.de, hjlipp@web.de
-Subject: i4l gigaset: move sysfs entry to tty class device
-
-From: Hansjoerg Lipp <hjlipp@web.de>
-
-Using the class device pointer returned by tty_register_device() with
-part 1 of the patch, attach the Gigaset drivers' "cidmode" sysfs entry
-to its tty class device, where it can be found more easily by users
-who do not know nor care which USB port the device is attached to.
-
-Signed-off-by: Hansjoerg Lipp <hjlipp@web.de>
-Signed-off-by: Tilman Schmidt <tilman@imap.cc>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
-
----
- Documentation/isdn/README.gigaset | 7 ++++---
- drivers/isdn/gigaset/common.c | 13 +++++++------
- drivers/isdn/gigaset/gigaset.h | 1 +
- drivers/isdn/gigaset/interface.c | 10 +++++++++-
- drivers/isdn/gigaset/proc.c | 21 +++++++++++++--------
- 5 files changed, 34 insertions(+), 18 deletions(-)
-
---- gregkh-2.6.orig/Documentation/isdn/README.gigaset
-+++ gregkh-2.6/Documentation/isdn/README.gigaset
-@@ -124,7 +124,8 @@ GigaSet 307x Device Driver
-
- You can use some configuration tool of your distribution to configure this
- "modem" or configure pppd/wvdial manually. There are some example ppp
-- configuration files and chat scripts in the gigaset-VERSION/ppp directory.
-+ configuration files and chat scripts in the gigaset-VERSION/ppp directory
-+ in the driver packages from http://sourceforge.net/projects/gigaset307x/.
- Please note that the USB drivers are not able to change the state of the
- control lines (the M105 driver can be configured to use some undocumented
- control requests, if you really need the control lines, though). This means
-@@ -164,8 +165,8 @@ GigaSet 307x Device Driver
-
- If you want both of these at once, you are out of luck.
-
-- You can also use /sys/module/<name>/parameters/cidmode for changing
-- the CID mode setting (<name> is usb_gigaset or bas_gigaset).
-+ You can also use /sys/class/tty/ttyGxy/cidmode for changing the CID mode
-+ setting (ttyGxy is ttyGU0 or ttyGB0).
-
-
- 3. Troubleshooting
---- gregkh-2.6.orig/drivers/isdn/gigaset/common.c
-+++ gregkh-2.6/drivers/isdn/gigaset/common.c
-@@ -460,6 +460,9 @@ void gigaset_freecs(struct cardstate *cs
-
- switch (cs->cs_init) {
- default:
-+ /* clear device sysfs */
-+ gigaset_free_dev_sysfs(cs);
-+
- gigaset_if_free(cs);
-
- gig_dbg(DEBUG_INIT, "clearing hw");
-@@ -699,6 +702,7 @@ struct cardstate *gigaset_initcs(struct
- cs->open_count = 0;
- cs->dev = NULL;
- cs->tty = NULL;
-+ cs->class = NULL;
- cs->cidmode = cidmode != 0;
-
- //if(onechannel) { //FIXME
-@@ -760,6 +764,9 @@ struct cardstate *gigaset_initcs(struct
-
- gigaset_if_init(cs);
-
-+ /* set up device sysfs */
-+ gigaset_init_dev_sysfs(cs);
-+
- spin_lock_irqsave(&cs->lock, flags);
- cs->running = 1;
- spin_unlock_irqrestore(&cs->lock, flags);
-@@ -902,9 +909,6 @@ int gigaset_start(struct cardstate *cs)
-
- wait_event(cs->waitqueue, !cs->waiting);
-
-- /* set up device sysfs */
-- gigaset_init_dev_sysfs(cs);
--
- mutex_unlock(&cs->mutex);
- return 1;
-
-@@ -969,9 +973,6 @@ void gigaset_stop(struct cardstate *cs)
- //FIXME
- }
-
-- /* clear device sysfs */
-- gigaset_free_dev_sysfs(cs);
--
- cleanup_cs(cs);
-
- exit:
---- gregkh-2.6.orig/drivers/isdn/gigaset/gigaset.h
-+++ gregkh-2.6/drivers/isdn/gigaset/gigaset.h
-@@ -445,6 +445,7 @@ struct cardstate {
- struct gigaset_driver *driver;
- unsigned minor_index;
- struct device *dev;
-+ struct class_device *class;
-
- const struct gigaset_ops *ops;
-
---- gregkh-2.6.orig/drivers/isdn/gigaset/interface.c
-+++ gregkh-2.6/drivers/isdn/gigaset/interface.c
-@@ -625,7 +625,14 @@ void gigaset_if_init(struct cardstate *c
- return;
-
- tasklet_init(&cs->if_wake_tasklet, &if_wake, (unsigned long) cs);
-- tty_register_device(drv->tty, cs->minor_index, NULL);
-+ cs->class = tty_register_device(drv->tty, cs->minor_index, NULL);
-+
-+ if (!IS_ERR(cs->class))
-+ class_set_devdata(cs->class, cs);
-+ else {
-+ warn("could not register device to the tty subsystem");
-+ cs->class = NULL;
-+ }
- }
-
- void gigaset_if_free(struct cardstate *cs)
-@@ -638,6 +645,7 @@ void gigaset_if_free(struct cardstate *c
-
- tasklet_disable(&cs->if_wake_tasklet);
- tasklet_kill(&cs->if_wake_tasklet);
-+ cs->class = NULL;
- tty_unregister_device(drv->tty, cs->minor_index);
- }
-
---- gregkh-2.6.orig/drivers/isdn/gigaset/proc.c
-+++ gregkh-2.6/drivers/isdn/gigaset/proc.c
-@@ -16,12 +16,11 @@
- #include "gigaset.h"
- #include <linux/ctype.h>
-
--static ssize_t show_cidmode(struct device *dev, struct device_attribute *attr,
-- char *buf)
-+static ssize_t show_cidmode(struct class_device *class, char *buf)
- {
- int ret;
- unsigned long flags;
-- struct cardstate *cs = dev_get_drvdata(dev);
-+ struct cardstate *cs = class_get_devdata(class);
-
- spin_lock_irqsave(&cs->lock, flags);
- ret = sprintf(buf, "%u\n", cs->cidmode);
-@@ -30,10 +29,10 @@ static ssize_t show_cidmode(struct devic
- return ret;
- }
-
--static ssize_t set_cidmode(struct device *dev, struct device_attribute *attr,
-+static ssize_t set_cidmode(struct class_device *class,
- const char *buf, size_t count)
- {
-- struct cardstate *cs = dev_get_drvdata(dev);
-+ struct cardstate *cs = class_get_devdata(class);
- long int value;
- char *end;
-
-@@ -65,18 +64,24 @@ static ssize_t set_cidmode(struct device
- return count;
- }
-
--static DEVICE_ATTR(cidmode, S_IRUGO|S_IWUSR, show_cidmode, set_cidmode);
-+static CLASS_DEVICE_ATTR(cidmode, S_IRUGO|S_IWUSR, show_cidmode, set_cidmode);
-
- /* free sysfs for device */
- void gigaset_free_dev_sysfs(struct cardstate *cs)
- {
-+ if (!cs->class)
-+ return;
-+
- gig_dbg(DEBUG_INIT, "removing sysfs entries");
-- device_remove_file(cs->dev, &dev_attr_cidmode);
-+ class_device_remove_file(cs->class, &class_device_attr_cidmode);
- }
-
- /* initialize sysfs for device */
- void gigaset_init_dev_sysfs(struct cardstate *cs)
- {
-+ if (!cs->class)
-+ return;
-+
- gig_dbg(DEBUG_INIT, "setting up sysfs");
-- device_create_file(cs->dev, &dev_attr_cidmode);
-+ class_device_create_file(cs->class, &class_device_attr_cidmode);
- }
diff --git a/driver/kobject_add-make-people-pay-attention-to-errors.patch b/driver/kobject_add-make-people-pay-attention-to-errors.patch
deleted file mode 100644
index 747cd268f228c..0000000000000
--- a/driver/kobject_add-make-people-pay-attention-to-errors.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From foo@baz Tue Apr 9 12:12:43 2002
-Date: Thu, 18 May 2006 10:39:21 -0700
-To: Greg KH <greg@kroah.com>
-From: Greg Kroah-Hartman <gregkh@suse.de>
-Subject: kobject: make people pay attention to kobject_add errors
-
-These really need to be fixed, shout it out to the world.
-
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- lib/kobject.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
---- gregkh-2.6.orig/lib/kobject.c
-+++ gregkh-2.6/lib/kobject.c
-@@ -198,14 +198,14 @@ int kobject_add(struct kobject * kobj)
-
- /* be noisy on error issues */
- if (error == -EEXIST)
-- pr_debug("kobject_add failed for %s with -EEXIST, "
-+ printk("kobject_add failed for %s with -EEXIST, "
- "don't try to register things with the "
- "same name in the same directory.\n",
- kobject_name(kobj));
- else
-- pr_debug("kobject_add failed for %s (%d)\n",
-+ printk("kobject_add failed for %s (%d)\n",
- kobject_name(kobj), error);
-- /* dump_stack(); */
-+ dump_stack();
- }
-
- return error;
diff --git a/driver/make_class_name-kobj.patch b/driver/make_class_name-kobj.patch
deleted file mode 100644
index 898dc68a1b3c3..0000000000000
--- a/driver/make_class_name-kobj.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-From foo@baz Tue Apr 9 12:12:43 2002
-Date: Tue, 20 Jun 2006 13:59:20 -0700
-To: Greg KH <greg@kroah.com>
-From: Greg Kroah-Hartman <gregkh@suse.de>
-Subject: Driver core: change make_class_name() to take kobjects
-
-This is needed for a future patch for the device code to create the
-proper symlinks for devices that are "class devices".
-
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
-
----
- drivers/base/base.h | 1 +
- drivers/base/class.c | 31 +++++++++++++++++--------------
- 2 files changed, 18 insertions(+), 14 deletions(-)
-
---- gregkh-2.6.orig/drivers/base/base.h
-+++ gregkh-2.6/drivers/base/base.h
-@@ -42,4 +42,5 @@ struct class_device_attribute *to_class_
- return container_of(_attr, struct class_device_attribute, attr);
- }
-
-+extern char *make_class_name(const char *name, struct kobject *kobj);
-
---- gregkh-2.6.orig/drivers/base/class.c
-+++ gregkh-2.6/drivers/base/class.c
-@@ -504,22 +504,21 @@ void class_device_initialize(struct clas
- INIT_LIST_HEAD(&class_dev->node);
- }
-
--static char *make_class_name(struct class_device *class_dev)
-+char *make_class_name(const char *name, struct kobject *kobj)
- {
-- char *name;
-+ char *class_name;
- int size;
-
-- size = strlen(class_dev->class->name) +
-- strlen(kobject_name(&class_dev->kobj)) + 2;
-+ size = strlen(name) + strlen(kobject_name(kobj)) + 2;
-
-- name = kmalloc(size, GFP_KERNEL);
-- if (!name)
-+ class_name = kmalloc(size, GFP_KERNEL);
-+ if (!class_name)
- return ERR_PTR(-ENOMEM);
-
-- strcpy(name, class_dev->class->name);
-- strcat(name, ":");
-- strcat(name, kobject_name(&class_dev->kobj));
-- return name;
-+ strcpy(class_name, name);
-+ strcat(class_name, ":");
-+ strcat(class_name, kobject_name(kobj));
-+ return class_name;
- }
-
- int class_device_add(struct class_device *class_dev)
-@@ -594,7 +593,8 @@ int class_device_add(struct class_device
- goto out5;
-
- if (class_dev->dev) {
-- class_name = make_class_name(class_dev);
-+ class_name = make_class_name(class_dev->class->name,
-+ &class_dev->kobj);
- error = sysfs_create_link(&class_dev->kobj,
- &class_dev->dev->kobj, "device");
- if (error)
-@@ -731,7 +731,8 @@ void class_device_del(struct class_devic
- }
-
- if (class_dev->dev) {
-- class_name = make_class_name(class_dev);
-+ class_name = make_class_name(class_dev->class->name,
-+ &class_dev->kobj);
- sysfs_remove_link(&class_dev->kobj, "device");
- sysfs_remove_link(&class_dev->dev->kobj, class_name);
- }
-@@ -796,14 +797,16 @@ int class_device_rename(struct class_dev
- new_name);
-
- if (class_dev->dev)
-- old_class_name = make_class_name(class_dev);
-+ old_class_name = make_class_name(class_dev->class->name,
-+ &class_dev->kobj);
-
- strlcpy(class_dev->class_id, new_name, KOBJ_NAME_LEN);
-
- error = kobject_rename(&class_dev->kobj, new_name);
-
- if (class_dev->dev) {
-- new_class_name = make_class_name(class_dev);
-+ new_class_name = make_class_name(class_dev->class->name,
-+ &class_dev->kobj);
- sysfs_create_link(&class_dev->dev->kobj, &class_dev->kobj,
- new_class_name);
- sysfs_remove_link(&class_dev->dev->kobj, old_class_name);
diff --git a/driver/platform_bus-learns-about-modalias.patch b/driver/platform_bus-learns-about-modalias.patch
deleted file mode 100644
index fb1b6f9ffe465..0000000000000
--- a/driver/platform_bus-learns-about-modalias.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From david-b@pacbell.net Mon May 29 10:37:39 2006
-From: David Brownell <david-b@pacbell.net>
-To: Greg KH <greg@kroah.com>
-Subject: platform_bus learns about modalias
-Date: Mon, 29 May 2006 10:37:33 -0700
-Cc: Russell King <rmk@arm.linux.org.uk>,
- Linux Kernel list <linux-kernel@vger.kernel.org>
-Message-Id: <200605291037.34305.david-b@pacbell.net>
-
-This patch adds modalias support to platform devices, for simpler
-hotplug/coldplug driven driver setup.
-
-Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/base/platform.c | 33 +++++++++++++++++++++++++++++++++
- 1 file changed, 33 insertions(+)
-
---- gregkh-2.6.orig/drivers/base/platform.c
-+++ gregkh-2.6/drivers/base/platform.c
-@@ -452,6 +452,37 @@ void platform_driver_unregister(struct p
- EXPORT_SYMBOL_GPL(platform_driver_unregister);
-
-
-+/* modalias support enables more hands-off userspace setup:
-+ * (a) environment variable lets new-style hotplug events work once system is
-+ * fully running: "modprobe $MODALIAS"
-+ * (b) sysfs attribute lets new-style coldplug recover from hotplug events
-+ * mishandled before system is fully running: "modprobe $(cat modalias)"
-+ */
-+static ssize_t
-+modalias_show(struct device *dev, struct device_attribute *a, char *buf)
-+{
-+ struct platform_device *pdev = to_platform_device(dev);
-+ int len = snprintf(buf, PAGE_SIZE, "%s\n", pdev->name);
-+
-+ return (len >= PAGE_SIZE) ? (PAGE_SIZE - 1) : len;
-+}
-+
-+static struct device_attribute platform_dev_attrs[] = {
-+ __ATTR_RO(modalias),
-+ __ATTR_NULL,
-+};
-+
-+static int platform_uevent(struct device *dev, char **envp, int num_envp,
-+ char *buffer, int buffer_size)
-+{
-+ struct platform_device *pdev = to_platform_device(dev);
-+
-+ envp[0] = buffer;
-+ snprintf(buffer, buffer_size, "MODALIAS=%s", pdev->name);
-+ return 0;
-+}
-+
-+
- /**
- * platform_match - bind platform device to platform driver.
- * @dev: device.
-@@ -496,7 +527,9 @@ static int platform_resume(struct device
-
- struct bus_type platform_bus_type = {
- .name = "platform",
-+ .dev_attrs = platform_dev_attrs,
- .match = platform_match,
-+ .uevent = platform_uevent,
- .suspend = platform_suspend,
- .resume = platform_resume,
- };
diff --git a/driver/remove-duplication-from-documentation-power-devices_txt.patch b/driver/remove-duplication-from-documentation-power-devices_txt.patch
deleted file mode 100644
index 6301c8aa94ba4..0000000000000
--- a/driver/remove-duplication-from-documentation-power-devices_txt.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-From david-b@pacbell.net Tue May 16 17:42:31 2006
-From: David Brownell <david-b@pacbell.net>
-To: Greg KH <greg@kroah.com>
-Subject: remove duplication from Documentation/power/devices.txt
-Date: Tue, 16 May 2006 17:00:08 -0700
-Cc: linux-pm@lists.osdl.org
-Message-Id: <200605161700.10100.david-b@pacbell.net>
-
-Remove a chunk of duplicated documentation text.
-
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- Documentation/power/devices.txt | 90 ----------------------------------------
- 1 file changed, 90 deletions(-)
-
---- gregkh-2.6.orig/Documentation/power/devices.txt
-+++ gregkh-2.6/Documentation/power/devices.txt
-@@ -135,96 +135,6 @@ HW.
-
- FREEZE -- stop DMA and interrupts, and be prepared to reinit HW from
- scratch. That probably means stop accepting upstream requests, the
--actual policy of what to do with them beeing specific to a given
--driver. It's acceptable for a network driver to just drop packets
--while a block driver is expected to block the queue so no request is
--lost. (Use IDE as an example on how to do that). FREEZE requires no
--power state change, and it's expected for drivers to be able to
--quickly transition back to operating state.
--
--SUSPEND -- like FREEZE, but also put hardware into low-power state. If
--there's need to distinguish several levels of sleep, additional flag
--is probably best way to do that.
--
--Transitions are only from a resumed state to a suspended state, never
--between 2 suspended states. (ON -> FREEZE or ON -> SUSPEND can happen,
--FREEZE -> SUSPEND or SUSPEND -> FREEZE can not).
--
--All events are:
--
--[NOTE NOTE NOTE: If you are driver author, you should not care; you
--should only look at event, and ignore flags.]
--
--#Prepare for suspend -- userland is still running but we are going to
--#enter suspend state. This gives drivers chance to load firmware from
--#disk and store it in memory, or do other activities taht require
--#operating userland, ability to kmalloc GFP_KERNEL, etc... All of these
--#are forbiden once the suspend dance is started.. event = ON, flags =
--#PREPARE_TO_SUSPEND
--
--Apm standby -- prepare for APM event. Quiesce devices to make life
--easier for APM BIOS. event = FREEZE, flags = APM_STANDBY
--
--Apm suspend -- same as APM_STANDBY, but it we should probably avoid
--spinning down disks. event = FREEZE, flags = APM_SUSPEND
--
--System halt, reboot -- quiesce devices to make life easier for BIOS. event
--= FREEZE, flags = SYSTEM_HALT or SYSTEM_REBOOT
--
--System shutdown -- at least disks need to be spun down, or data may be
--lost. Quiesce devices, just to make life easier for BIOS. event =
--FREEZE, flags = SYSTEM_SHUTDOWN
--
--Kexec -- turn off DMAs and put hardware into some state where new
--kernel can take over. event = FREEZE, flags = KEXEC
--
--Powerdown at end of swsusp -- very similar to SYSTEM_SHUTDOWN, except wake
--may need to be enabled on some devices. This actually has at least 3
--subtypes, system can reboot, enter S4 and enter S5 at the end of
--swsusp. event = FREEZE, flags = SWSUSP and one of SYSTEM_REBOOT,
--SYSTEM_SHUTDOWN, SYSTEM_S4
--
--Suspend to ram -- put devices into low power state. event = SUSPEND,
--flags = SUSPEND_TO_RAM
--
--Freeze for swsusp snapshot -- stop DMA and interrupts. No need to put
--devices into low power mode, but you must be able to reinitialize
--device from scratch in resume method. This has two flavors, its done
--once on suspending kernel, once on resuming kernel. event = FREEZE,
--flags = DURING_SUSPEND or DURING_RESUME
--
--Device detach requested from /sys -- deinitialize device; proably same as
--SYSTEM_SHUTDOWN, I do not understand this one too much. probably event
--= FREEZE, flags = DEV_DETACH.
--
--#These are not really events sent:
--#
--#System fully on -- device is working normally; this is probably never
--#passed to suspend() method... event = ON, flags = 0
--#
--#Ready after resume -- userland is now running, again. Time to free any
--#memory you ate during prepare to suspend... event = ON, flags =
--#READY_AFTER_RESUME
--#
--
--
--pm_message_t meaning
--
--pm_message_t has two fields. event ("major"), and flags. If driver
--does not know event code, it aborts the request, returning error. Some
--drivers may need to deal with special cases based on the actual type
--of suspend operation being done at the system level. This is why
--there are flags.
--
--Event codes are:
--
--ON -- no need to do anything except special cases like broken
--HW.
--
--# NOTIFICATION -- pretty much same as ON?
--
--FREEZE -- stop DMA and interrupts, and be prepared to reinit HW from
--scratch. That probably means stop accepting upstream requests, the
- actual policy of what to do with them being specific to a given
- driver. It's acceptable for a network driver to just drop packets
- while a block driver is expected to block the queue so no request is
diff --git a/driver/stable-abi-docs.patch b/driver/stable-abi-docs.patch
deleted file mode 100644
index e777851d3cf67..0000000000000
--- a/driver/stable-abi-docs.patch
+++ /dev/null
@@ -1,208 +0,0 @@
-From foo@baz Tue Apr 9 12:12:43 2002
-Date: Thu, 27 Apr 2006 14:10:12 -0700
-To: Greg KH <greg@kroah.com>
-From: Greg Kroah-Hartman <gregkh@suse.de>
-Subject: Add kernel<->userspace ABI stability documentation
-
-
-Signed-off-by: Kay Sievers <kay.sievers@suse.de>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- Documentation/ABI/README | 77 ++++++++++++++++++++++++++++++++
- Documentation/ABI/obsolete/devfs | 13 +++++
- Documentation/ABI/stable/syscalls | 10 ++++
- Documentation/ABI/stable/sysfs-module | 30 ++++++++++++
- Documentation/ABI/testing/sysfs-class | 16 ++++++
- Documentation/ABI/testing/sysfs-devices | 25 ++++++++++
- 6 files changed, 171 insertions(+)
-
---- /dev/null
-+++ gregkh-2.6/Documentation/ABI/README
-@@ -0,0 +1,77 @@
-+This directory attempts to document the ABI between the Linux kernel and
-+userspace, and the relative stability of these interfaces. Due to the
-+everchanging nature of Linux, and the differing maturity levels, these
-+interfaces should be used by userspace programs in different ways.
-+
-+We have four different levels of ABI stability, as shown by the four
-+different subdirectories in this location. Interfaces may change levels
-+of stability according to the rules described below.
-+
-+The different levels of stability are:
-+
-+ stable/
-+ This directory documents the interfaces that the developer has
-+ defined to be stable. Userspace programs are free to use these
-+ interfaces with no restrictions, and backward compatibility for
-+ them will be guaranteed for at least 2 years. Most interfaces
-+ (like syscalls) are expected to never change and always be
-+ available.
-+
-+ testing/
-+ This directory documents interfaces that are felt to be stable,
-+ as the main development of this interface has been completed.
-+ The interface can be changed to add new features, but the
-+ current interface will not break by doing this, unless grave
-+ errors or security problems are found in them. Userspace
-+ programs can start to rely on these interfaces, but they must be
-+ aware of changes that can occur before these interfaces move to
-+ be marked stable. Programs that use these interfaces are
-+ strongly encouraged to add their name to the description of
-+ these interfaces, so that the kernel developers can easily
-+ notify them if any changes occur (see the description of the
-+ layout of the files below for details on how to do this.)
-+
-+ obsolete/
-+ This directory documents interfaces that are still remaining in
-+ the kernel, but are marked to be removed at some later point in
-+ time. The description of the interface will document the reason
-+ why it is obsolete and when it can be expected to be removed.
-+ The file Documentation/feature-removal-schedule.txt may describe
-+ some of these interfaces, giving a schedule for when they will
-+ be removed.
-+
-+ removed/
-+ This directory contains a list of the old interfaces that have
-+ been removed from the kernel.
-+
-+Every file in these directories will contain the following information:
-+
-+What: Short description of the interface
-+Date: Date created
-+KernelVersion: Kernel version this feature first showed up in.
-+Contact: Primary contact for this interface (may be a mailing list)
-+Description: Long description of the interface and how to use it.
-+Users: All users of this interface who wish to be notified when
-+ it changes. This is very important for interfaces in
-+ the "testing" stage, so that kernel developers can work
-+ with userspace developers to ensure that things do not
-+ break in ways that are unacceptable. It is also
-+ important to get feedback for these interfaces to make
-+ sure they are working in a proper way and do not need to
-+ be changed further.
-+
-+
-+How things move between levels:
-+
-+Interfaces in stable may move to obsolete, as long as the proper
-+notification is given.
-+
-+Interfaces may be removed from obsolete and the kernel as long as the
-+documented amount of time has gone by.
-+
-+Interfaces in the testing state can move to the stable state when the
-+developers feel they are finished. They cannot be removed from the
-+kernel tree without going through the obsolete state first.
-+
-+It's up to the developer to place their interfaces in the category they
-+wish for it to start out in.
---- /dev/null
-+++ gregkh-2.6/Documentation/ABI/obsolete/devfs
-@@ -0,0 +1,13 @@
-+What: devfs
-+Date: July 2005
-+Contact: Greg Kroah-Hartman <gregkh@suse.de>
-+Description:
-+ devfs has been unmaintained for a number of years, has unfixable
-+ races, contains a naming policy within the kernel that is
-+ against the LSB, and can be replaced by using udev.
-+ The files fs/devfs/*, include/linux/devfs_fs*.h will be removed,
-+ along with the the assorted devfs function calls throughout the
-+ kernel tree.
-+
-+Users:
-+
---- /dev/null
-+++ gregkh-2.6/Documentation/ABI/stable/syscalls
-@@ -0,0 +1,10 @@
-+What: The kernel syscall interface
-+Description:
-+ This interface matches much of the POSIX interface and is based
-+ on it and other Unix based interfaces. It will only be added to
-+ over time, and not have things removed from it.
-+
-+ Note that this interface is different for every architecture
-+ that Linux supports. Please see the architecture-specific
-+ documentation for details on the syscall numbers that are to be
-+ mapped to each syscall.
---- /dev/null
-+++ gregkh-2.6/Documentation/ABI/stable/sysfs-module
-@@ -0,0 +1,30 @@
-+What: /sys/module
-+Description:
-+ The /sys/module tree consists of the following structure:
-+
-+ /sys/module/MODULENAME
-+ The name of the module that is in the kernel. This
-+ module name will show up either if the module is built
-+ directly into the kernel, or if it is loaded as a
-+ dyanmic module.
-+
-+ /sys/module/MODULENAME/parameters
-+ This directory contains individual files that are each
-+ individual parameters of the module that are able to be
-+ changed at runtime. See the individual module
-+ documentation as to the contents of these parameters and
-+ what they accomplish.
-+
-+ Note: The individual parameter names and values are not
-+ considered stable, only the fact that they will be
-+ placed in this location within sysfs. See the
-+ individual driver documentation for details as to the
-+ stability of the different parameters.
-+
-+ /sys/module/MODULENAME/refcnt
-+ If the module is able to be unloaded from the kernel, this file
-+ will contain the current reference count of the module.
-+
-+ Note: If the module is built into the kernel, or if the
-+ CONFIG_MODULE_UNLOAD kernel configuration value is not enabled,
-+ this file will not be present.
---- /dev/null
-+++ gregkh-2.6/Documentation/ABI/testing/sysfs-class
-@@ -0,0 +1,16 @@
-+What: /sys/class/
-+Date: Febuary 2006
-+Contact: Greg Kroah-Hartman <gregkh@suse.de>
-+Description:
-+ The /sys/class directory will consist of a group of
-+ subdirectories describing individual classes of devices
-+ in the kernel. The individual directories will consist
-+ of either subdirectories, or symlinks to other
-+ directories.
-+
-+ All programs that use this directory tree must be able
-+ to handle both subdirectories or symlinks in order to
-+ work properly.
-+
-+Users:
-+ udev <linux-hotplug-devel@lists.sourceforge.net>
---- /dev/null
-+++ gregkh-2.6/Documentation/ABI/testing/sysfs-devices
-@@ -0,0 +1,25 @@
-+What: /sys/devices
-+Date: February 2006
-+Contact: Greg Kroah-Hartman <gregkh@suse.de>
-+Description:
-+ The /sys/devices tree contains a snapshot of the
-+ internal state of the kernel device tree. Devices will
-+ be added and removed dynamically as the machine runs,
-+ and between different kernel versions, the layout of the
-+ devices within this tree will change.
-+
-+ Please do not rely on the format of this tree because of
-+ this. If a program wishes to find different things in
-+ the tree, please use the /sys/class structure and rely
-+ on the symlinks there to point to the proper location
-+ within the /sys/devices tree of the individual devices.
-+ Or rely on the uevent messages to notify programs of
-+ devices being added and removed from this tree to find
-+ the location of those devices.
-+
-+ Note that sometimes not all devices along the directory
-+ chain will have emitted uevent messages, so userspace
-+ programs must be able to handle such occurrences.
-+
-+Users:
-+ udev <linux-hotplug-devel@lists.sourceforge.net>
diff --git a/driver/tty-return-class-device-pointer-from-tty_register_device.patch b/driver/tty-return-class-device-pointer-from-tty_register_device.patch
deleted file mode 100644
index c72f71b6dbb8d..0000000000000
--- a/driver/tty-return-class-device-pointer-from-tty_register_device.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From tilman@imap.cc Sat Apr 22 09:35:50 2006
-Message-ID: <444A5BA5.6040007@imap.cc>
-Date: Sat, 22 Apr 2006 18:36:53 +0200
-From: Tilman Schmidt <tilman@imap.cc>
-To: Andrew Morton <akpm@osdl.org>
-Cc: linux-kernel@vger.kernel.org, gregkh@suse.de, hjlipp@web.de
-Subject: TTY: return class device pointer from tty_register_device()
-
-From: Hansjoerg Lipp <hjlipp@web.de>
-
-Let tty_register_device() return a pointer to the class device it creates.
-This allows registrants to add their own sysfs files under the class
-device node.
-
-Signed-off-by: Hansjoerg Lipp <hjlipp@web.de>
-Signed-off-by: Tilman Schmidt <tilman@imap.cc>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/char/tty_io.c | 11 +++++++----
- include/linux/tty.h | 4 +++-
- 2 files changed, 10 insertions(+), 5 deletions(-)
-
---- gregkh-2.6.orig/drivers/char/tty_io.c
-+++ gregkh-2.6/drivers/char/tty_io.c
-@@ -2961,12 +2961,14 @@ static struct class *tty_class;
- * This field is optional, if there is no known struct device for this
- * tty device it can be set to NULL safely.
- *
-+ * Returns a pointer to the class device (or ERR_PTR(-EFOO) on error).
-+ *
- * This call is required to be made to register an individual tty device if
- * the tty driver's flags have the TTY_DRIVER_NO_DEVFS bit set. If that
- * bit is not set, this function should not be called.
- */
--void tty_register_device(struct tty_driver *driver, unsigned index,
-- struct device *device)
-+struct class_device *tty_register_device(struct tty_driver *driver,
-+ unsigned index, struct device *device)
- {
- char name[64];
- dev_t dev = MKDEV(driver->major, driver->minor_start) + index;
-@@ -2974,7 +2976,7 @@ void tty_register_device(struct tty_driv
- if (index >= driver->num) {
- printk(KERN_ERR "Attempt to register invalid tty line number "
- " (%d).\n", index);
-- return;
-+ return ERR_PTR(-EINVAL);
- }
-
- devfs_mk_cdev(dev, S_IFCHR | S_IRUSR | S_IWUSR,
-@@ -2984,7 +2986,8 @@ void tty_register_device(struct tty_driv
- pty_line_name(driver, index, name);
- else
- tty_line_name(driver, index, name);
-- class_device_create(tty_class, NULL, dev, device, "%s", name);
-+
-+ return class_device_create(tty_class, NULL, dev, device, "%s", name);
- }
-
- /**
---- gregkh-2.6.orig/include/linux/tty.h
-+++ gregkh-2.6/include/linux/tty.h
-@@ -290,7 +290,9 @@ extern int tty_register_ldisc(int disc,
- extern int tty_unregister_ldisc(int disc);
- extern int tty_register_driver(struct tty_driver *driver);
- extern int tty_unregister_driver(struct tty_driver *driver);
--extern void tty_register_device(struct tty_driver *driver, unsigned index, struct device *dev);
-+extern struct class_device *tty_register_device(struct tty_driver *driver,
-+ unsigned index,
-+ struct device *dev);
- extern void tty_unregister_device(struct tty_driver *driver, unsigned index);
- extern int tty_read_raw_data(struct tty_struct *tty, unsigned char *bufp,
- int buflen);