aboutsummaryrefslogtreecommitdiffstats
diff options
authorGreg Kroah-Hartman <gregkh@suse.de>2008-11-21 11:11:50 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2008-11-21 11:11:50 -0800
commit7119b1310b8ee6de267f51d20e7727c812a83a49 (patch)
tree7d5a05682d07126e3f7633e44c674ff01d9bb6f7
parentb145d543fad455d98fd1be7a15366982d356cbc8 (diff)
downloadpatches-7119b1310b8ee6de267f51d20e7727c812a83a49.tar.gz
more patches
-rw-r--r--driver-core/char_dev-add-cdev-release-and-convert-cdev_alloc-to-use-it.patch96
-rw-r--r--series3
-rw-r--r--staging/staging-add-lcd-panel-driver.patch2
-rw-r--r--staging/staging-asus_oled-fix-build-dependancy.patch28
-rw-r--r--staging/staging-comedi-fix-checkpatch.pl-warning-in-interrupt.h.patch36
5 files changed, 164 insertions, 1 deletions
diff --git a/driver-core/char_dev-add-cdev-release-and-convert-cdev_alloc-to-use-it.patch b/driver-core/char_dev-add-cdev-release-and-convert-cdev_alloc-to-use-it.patch
new file mode 100644
index 00000000000000..1d80137841e542
--- /dev/null
+++ b/driver-core/char_dev-add-cdev-release-and-convert-cdev_alloc-to-use-it.patch
@@ -0,0 +1,96 @@
+From tj@kernel.org Fri Nov 21 11:05:29 2008
+From: Tejun Heo <tj@kernel.org>
+Date: Thu, 20 Nov 2008 20:45:36 +0900
+Subject: char_dev: add cdev->release() and convert cdev_alloc() to use it
+To: Greg KH <greg@kroah.com>
+Cc: Boaz Harrosh <bharrosh@panasas.com>, Miklos Szeredi <miklos@szeredi.hu>
+Message-ID: <49254DE0.8040002@kernel.org>
+
+From: Tejun Heo <tj@kernel.org>
+
+Add cdev->release() so that cdev can be considered in more involved
+object lifetime management. cdev_alloc() used a separate ktype for
+auto-free release(). This patch converts it to use cdev->release() so
+that there's no need for separate ktype and cdev_init() can be used
+for auto-free variant too.
+
+Signed-off-by: Tejun Heo <tj@kernel.org>
+Cc: Miklos Szeredi <miklos@szeredi.hu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/char_dev.c | 30 +++++++++++++-----------------
+ include/linux/cdev.h | 1 +
+ 2 files changed, 14 insertions(+), 17 deletions(-)
+
+--- a/fs/char_dev.c
++++ b/fs/char_dev.c
+@@ -482,26 +482,22 @@ void cdev_del(struct cdev *p)
+ }
+
+
+-static void cdev_default_release(struct kobject *kobj)
++static void cdev_release(struct kobject *kobj)
+ {
+ struct cdev *p = container_of(kobj, struct cdev, kobj);
+ cdev_purge(p);
++ if (p->release)
++ p->release(p);
+ }
+
+-static void cdev_dynamic_release(struct kobject *kobj)
+-{
+- struct cdev *p = container_of(kobj, struct cdev, kobj);
+- cdev_purge(p);
+- kfree(p);
+-}
+-
+-static struct kobj_type ktype_cdev_default = {
+- .release = cdev_default_release,
++static struct kobj_type cdev_ktype = {
++ .release = cdev_release,
+ };
+
+-static struct kobj_type ktype_cdev_dynamic = {
+- .release = cdev_dynamic_release,
+-};
++static void cdev_alloc_release(struct cdev *cdev)
++{
++ kfree(cdev);
++}
+
+ /**
+ * cdev_alloc() - allocate a cdev structure
+@@ -510,10 +506,10 @@ static struct kobj_type ktype_cdev_dynam
+ */
+ struct cdev *cdev_alloc(void)
+ {
+- struct cdev *p = kzalloc(sizeof(struct cdev), GFP_KERNEL);
++ struct cdev *p = kmalloc(sizeof(struct cdev), GFP_KERNEL);
+ if (p) {
+- INIT_LIST_HEAD(&p->list);
+- kobject_init(&p->kobj, &ktype_cdev_dynamic);
++ cdev_init(p, NULL);
++ p->release = cdev_alloc_release;
+ }
+ return p;
+ }
+@@ -530,7 +526,7 @@ void cdev_init(struct cdev *cdev, const
+ {
+ memset(cdev, 0, sizeof *cdev);
+ INIT_LIST_HEAD(&cdev->list);
+- kobject_init(&cdev->kobj, &ktype_cdev_default);
++ kobject_init(&cdev->kobj, &cdev_ktype);
+ cdev->ops = fops;
+ }
+
+--- a/include/linux/cdev.h
++++ b/include/linux/cdev.h
+@@ -16,6 +16,7 @@ struct cdev {
+ struct list_head list;
+ dev_t dev;
+ unsigned int count;
++ void (*release)(struct cdev *);
+ };
+
+ void cdev_init(struct cdev *, const struct file_operations *);
diff --git a/series b/series
index fdecdd29b6f4fe..c31829bbb737f9 100644
--- a/series
+++ b/series
@@ -46,6 +46,7 @@ driver-core/sysfs-clarify-sysfs_deprecated-help-text.patch
driver-core/uevent-don-t-pass-envp_ext-as-format-string-in-kobject_uevent_env.patch
driver-core/kobject-return-the-result-of-uevent-sending-by-netlink.patch
driver-core/kernel-ksysfs.c-fix-dependence-on-config_net.patch
+driver-core/char_dev-add-cdev-release-and-convert-cdev_alloc-to-use-it.patch
driver-core/bus_id-xen.patch
driver-core/bus_id-w1.patch
@@ -314,8 +315,10 @@ staging/staging-comedi-add-me_daq-driver.patch
staging/staging-comedi-me_daq-fix-checkpatch.pl-issues.patch
staging/staging-comedi-me_daq-remove-typedefs.patch
staging/staging-comedi-me_daq-fix-sparse-issues.patch
+staging/staging-comedi-fix-checkpatch.pl-warning-in-interrupt.h.patch
staging/staging-add-asus_oled-driver.patch
+staging/staging-asus_oled-fix-build-dependancy.patch
staging/staging-add-the-meilhaus-me-ids-driver-package.patch
diff --git a/staging/staging-add-lcd-panel-driver.patch b/staging/staging-add-lcd-panel-driver.patch
index 74b015d91377f0..89d02ef0c43300 100644
--- a/staging/staging-add-lcd-panel-driver.patch
+++ b/staging/staging-add-lcd-panel-driver.patch
@@ -2722,4 +2722,4 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+ - see if all of this could be easier done in userspace instead.
+
+Please send patches to Greg Kroah-Hartman <greg@kroah.com> and
-+Willy Tarreau <willy@meta-x.org>
++Willy Tarreau <w@1wt.eu>
diff --git a/staging/staging-asus_oled-fix-build-dependancy.patch b/staging/staging-asus_oled-fix-build-dependancy.patch
new file mode 100644
index 00000000000000..e6dd91df9f8f2a
--- /dev/null
+++ b/staging/staging-asus_oled-fix-build-dependancy.patch
@@ -0,0 +1,28 @@
+From kamalesh@linux.vnet.ibm.com Fri Nov 21 11:03:21 2008
+From: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
+Date: Thu, 20 Nov 2008 22:39:27 +0530
+Subject: Staging: asus_oled: fix build dependancy
+Cc: gregkh@suse.de, <sjakub@gmail.com>
+Message-ID: <20081120170927.GB4821@linux.vnet.ibm.com>
+
+From: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
+
+asus_oled depends on the CONFIG_USB_SUPPORT, I have only build tested
+the patch.
+
+Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/staging/asus_oled/Kconfig | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/staging/asus_oled/Kconfig
++++ b/drivers/staging/asus_oled/Kconfig
+@@ -1,5 +1,6 @@
+ config ASUS_OLED
+ tristate "Asus OLED driver"
++ depends on USB_SUPPORT
+ default N
+ ---help---
+ Enable support for the OLED display present in some Asus laptops.
diff --git a/staging/staging-comedi-fix-checkpatch.pl-warning-in-interrupt.h.patch b/staging/staging-comedi-fix-checkpatch.pl-warning-in-interrupt.h.patch
new file mode 100644
index 00000000000000..52c2cd97aab23f
--- /dev/null
+++ b/staging/staging-comedi-fix-checkpatch.pl-warning-in-interrupt.h.patch
@@ -0,0 +1,36 @@
+From foo@baz Fri Nov 21 10:58:10 PST 2008
+Date: Fri, 21 Nov 2008 10:58:10 -0800
+To: Greg KH <greg@kroah.com>
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Subject: Staging: comedi: fix checkpatch.pl warning in interrupt.h
+
+No more need for a kernel version check now that we are in the main
+kernel tree.
+
+Cc: David Schleef <ds@schleef.org>
+Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
+Cc: Ian Abbott <abbotti@mev.co.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/staging/comedi/interrupt.h | 7 -------
+ 1 file changed, 7 deletions(-)
+
+--- a/drivers/staging/comedi/interrupt.h
++++ b/drivers/staging/comedi/interrupt.h
+@@ -53,15 +53,8 @@ typedef void irqreturn_t;
+ #endif
+ #endif
+
+-/* if interrupt handler prototype has pt_regs* parameter */
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)
+-#define PT_REGS_ARG , struct pt_regs *regs
+-#define PT_REGS_CALL , regs
+-#define PT_REGS_NULL , NULL
+-#else
+ #define PT_REGS_ARG
+ #define PT_REGS_CALL
+ #define PT_REGS_NULL
+-#endif
+
+ #endif