aboutsummaryrefslogtreecommitdiffstats
path: root/driver
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2006-04-25 14:44:34 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2006-04-25 14:44:34 -0700
commitefe9e8261c1359bdb9ae90661eff88c8e740d3f9 (patch)
treef7881a02f588c2ecc05c0b4fb14eab6eb6eb368a /driver
parent706ddc032f54f763a03510d41c9bfcaa494560c7 (diff)
downloadpatches-efe9e8261c1359bdb9ae90661eff88c8e740d3f9.tar.gz
more patches added
Diffstat (limited to 'driver')
-rw-r--r--driver/fix-ocfs2-warning-when-debug_fs-is-not-enabled.patch44
-rw-r--r--driver/i4l-gigaset-move-sysfs-entry-to-tty-class-device.patch195
-rw-r--r--driver/kobject-possible-cleanups.patch74
-rw-r--r--driver/tty-return-class-device-pointer-from-tty_register_device.patch74
4 files changed, 387 insertions, 0 deletions
diff --git a/driver/fix-ocfs2-warning-when-debug_fs-is-not-enabled.patch b/driver/fix-ocfs2-warning-when-debug_fs-is-not-enabled.patch
new file mode 100644
index 0000000000000..7a304985decf2
--- /dev/null
+++ b/driver/fix-ocfs2-warning-when-debug_fs-is-not-enabled.patch
@@ -0,0 +1,44 @@
+From akpm@osdl.org Tue Apr 18 21:31:11 2006
+Message-Id: <200604190431.k3J4V3Bb008744@shell0.pdx.osdl.net>
+Subject: Fix OCFS2 warning when DEBUG_FS is not enabled
+To: greg@kroah.com
+Cc: akpm@osdl.org, khali@linux-fr.org, arjan@infradead.org,
+ Joel.Becker@oracle.com, mark.fasheh@oracle.com
+From: akpm@osdl.org
+Date: Tue, 18 Apr 2006 21:30:22 -0700
+
+
+From: Jean Delvare <khali@linux-fr.org>
+
+Fix the following warning which happens when OCFS2_FS is enabled but
+DEBUG_FS isn't:
+
+fs/ocfs2/dlmglue.c: In function `ocfs2_dlm_init_debug':
+fs/ocfs2/dlmglue.c:2036: warning: passing arg 5 of `debugfs_create_file' discards qualifiers from pointer target type
+
+Signed-off-by: Jean Delvare <khali@linux-fr.org>
+Cc: Arjan van de Ven <arjan@infradead.org>
+Cc: Joel Becker <Joel.Becker@oracle.com>
+Acked-by: Mark Fasheh <mark.fasheh@oracle.com>
+Signed-off-by: Andrew Morton <akpm@osdl.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+---
+
+---
+ include/linux/debugfs.h | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+--- gregkh-2.6.orig/include/linux/debugfs.h
++++ gregkh-2.6/include/linux/debugfs.h
+@@ -58,9 +58,8 @@ struct dentry *debugfs_create_blob(const
+ */
+
+ static inline struct dentry *debugfs_create_file(const char *name, mode_t mode,
+- struct dentry *parent,
+- void *data,
+- struct file_operations *fops)
++ struct dentry *parent, void *data,
++ const struct file_operations *fops)
+ {
+ return ERR_PTR(-ENODEV);
+ }
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
new file mode 100644
index 0000000000000..46f10dcf24ea5
--- /dev/null
+++ b/driver/i4l-gigaset-move-sysfs-entry-to-tty-class-device.patch
@@ -0,0 +1,195 @@
+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-possible-cleanups.patch b/driver/kobject-possible-cleanups.patch
new file mode 100644
index 0000000000000..42e254a2e29a7
--- /dev/null
+++ b/driver/kobject-possible-cleanups.patch
@@ -0,0 +1,74 @@
+From bunk@stusta.de Sat Apr 22 03:15:16 2006
+Date: Sat, 22 Apr 2006 12:14:44 +0200
+From: Adrian Bunk <bunk@stusta.de>
+To: gregkh@suse.de
+Subject: Kobject: possible cleanups
+Message-ID: <20060422101444.GN19754@stusta.de>
+Content-Disposition: inline
+
+This patch contains the following possible cleanups:
+- #if 0 the following unused global function:
+ - subsys_remove_file()
+- remove the following unused EXPORT_SYMBOL's:
+ - kset_find_obj
+ - subsystem_init
+- remove the following unused EXPORT_SYMBOL_GPL:
+ - kobject_add_dir
+
+Signed-off-by: Adrian Bunk <bunk@stusta.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+---
+ include/linux/kobject.h | 1 -
+ lib/kobject.c | 7 ++-----
+ 2 files changed, 2 insertions(+), 6 deletions(-)
+
+--- gregkh-2.6.orig/include/linux/kobject.h
++++ gregkh-2.6/include/linux/kobject.h
+@@ -257,7 +257,6 @@ struct subsys_attribute {
+ };
+
+ extern int subsys_create_file(struct subsystem * , struct subsys_attribute *);
+-extern void subsys_remove_file(struct subsystem * , struct subsys_attribute *);
+
+ #if defined(CONFIG_HOTPLUG)
+ void kobject_uevent(struct kobject *kobj, enum kobject_action action);
+--- gregkh-2.6.orig/lib/kobject.c
++++ gregkh-2.6/lib/kobject.c
+@@ -429,7 +429,6 @@ struct kobject *kobject_add_dir(struct k
+
+ return k;
+ }
+-EXPORT_SYMBOL_GPL(kobject_add_dir);
+
+ /**
+ * kset_init - initialize a kset for use
+@@ -576,7 +575,7 @@ int subsys_create_file(struct subsystem
+ * @s: subsystem.
+ * @a: attribute desciptor.
+ */
+-
++#if 0
+ void subsys_remove_file(struct subsystem * s, struct subsys_attribute * a)
+ {
+ if (subsys_get(s)) {
+@@ -584,6 +583,7 @@ void subsys_remove_file(struct subsystem
+ subsys_put(s);
+ }
+ }
++#endif /* 0 */
+
+ EXPORT_SYMBOL(kobject_init);
+ EXPORT_SYMBOL(kobject_register);
+@@ -595,10 +595,7 @@ EXPORT_SYMBOL(kobject_del);
+
+ EXPORT_SYMBOL(kset_register);
+ EXPORT_SYMBOL(kset_unregister);
+-EXPORT_SYMBOL(kset_find_obj);
+
+-EXPORT_SYMBOL(subsystem_init);
+ EXPORT_SYMBOL(subsystem_register);
+ EXPORT_SYMBOL(subsystem_unregister);
+ EXPORT_SYMBOL(subsys_create_file);
+-EXPORT_SYMBOL(subsys_remove_file);
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
new file mode 100644
index 0000000000000..6e093c4b66509
--- /dev/null
+++ b/driver/tty-return-class-device-pointer-from-tty_register_device.patch
@@ -0,0 +1,74 @@
+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
+@@ -291,7 +291,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);