diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2006-03-09 16:21:38 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-03-09 16:21:38 -0800 |
commit | e777bbc09f0785f314aae0367fdc8f9e3e1f28a7 (patch) | |
tree | b4c7ad2da47d146758077e2c0f9976ad894973d7 /driver | |
parent | fa6cd02ad70f7398b0df0a099238d468e4108838 (diff) | |
download | patches-e777bbc09f0785f314aae0367fdc8f9e3e1f28a7.tar.gz |
new patches and 2.6.16-rc5-git13 refresh
Diffstat (limited to 'driver')
-rw-r--r-- | driver/export_symbol_gpl_future-rcu.patch | 6 | ||||
-rw-r--r-- | driver/export_symbol_gpl_future-usb.patch | 8 | ||||
-rw-r--r-- | driver/kobject-add-error-notify.patch | 4 | ||||
-rw-r--r-- | driver/kobject-kobject.h-fix-a-typo.patch | 29 | ||||
-rw-r--r-- | driver/sysfs-fix-problem-with-duplicate-sysfs-directories-and-files.patch | 113 |
5 files changed, 151 insertions, 9 deletions
diff --git a/driver/export_symbol_gpl_future-rcu.patch b/driver/export_symbol_gpl_future-rcu.patch index b85c300f3b11a..23327239e1431 100644 --- a/driver/export_symbol_gpl_future-rcu.patch +++ b/driver/export_symbol_gpl_future-rcu.patch @@ -13,9 +13,9 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- gregkh-2.6.orig/kernel/rcupdate.c +++ gregkh-2.6/kernel/rcupdate.c -@@ -569,7 +569,7 @@ void synchronize_kernel(void) - - module_param(maxbatch, int, 0); +@@ -609,7 +609,7 @@ module_param(qlowmark, int, 0); + module_param(rsinterval, int, 0); + #endif EXPORT_SYMBOL_GPL(rcu_batches_completed); -EXPORT_SYMBOL(call_rcu); /* WARNING: GPL-only in April 2006. */ -EXPORT_SYMBOL(call_rcu_bh); /* WARNING: GPL-only in April 2006. */ diff --git a/driver/export_symbol_gpl_future-usb.patch b/driver/export_symbol_gpl_future-usb.patch index a12ede5d5377a..ed47b4b19bec1 100644 --- a/driver/export_symbol_gpl_future-usb.patch +++ b/driver/export_symbol_gpl_future-usb.patch @@ -39,10 +39,10 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> +EXPORT_SYMBOL_GPL_FUTURE(usb_deregister); --- gregkh-2.6.orig/Documentation/feature-removal-schedule.txt +++ gregkh-2.6/Documentation/feature-removal-schedule.txt -@@ -180,3 +180,21 @@ Why: These events are not correct, and d - when a file system has been mounted or unmounted. Userspace should - poll the /proc/mounts file instead to detect this properly. - Who: Greg Kroah-Hartman <gregkh@suse.de> +@@ -189,3 +189,21 @@ Why: Board specific code doesn't build a + users have complained indicating there is no more need for these + boards. This should really be considered a last call. + Who: Ralf Baechle <ralf@linux-mips.org> + +--------------------------- + diff --git a/driver/kobject-add-error-notify.patch b/driver/kobject-add-error-notify.patch index 89d6813d1f9f4..6b3573d64a9f1 100644 --- a/driver/kobject-add-error-notify.patch +++ b/driver/kobject-add-error-notify.patch @@ -14,7 +14,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- gregkh-2.6.orig/lib/kobject.c +++ gregkh-2.6/lib/kobject.c -@@ -194,6 +194,17 @@ int kobject_add(struct kobject * kobj) +@@ -196,6 +196,17 @@ int kobject_add(struct kobject * kobj) unlink(kobj); if (parent) kobject_put(parent); @@ -32,7 +32,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } return error; -@@ -207,18 +218,13 @@ int kobject_add(struct kobject * kobj) +@@ -209,18 +220,13 @@ int kobject_add(struct kobject * kobj) int kobject_register(struct kobject * kobj) { diff --git a/driver/kobject-kobject.h-fix-a-typo.patch b/driver/kobject-kobject.h-fix-a-typo.patch new file mode 100644 index 0000000000000..55a499ec50d58 --- /dev/null +++ b/driver/kobject-kobject.h-fix-a-typo.patch @@ -0,0 +1,29 @@ +From bunk@stusta.de Sat Mar 4 04:16:15 2006 +Date: Sat, 4 Mar 2006 13:15:31 +0100 +From: Adrian Bunk <bunk@stusta.de> +To: gregkh@suse.de +Subject: Kobject: kobject.h: fix a typo +Message-ID: <20060304121531.GU9295@stusta.de> +Content-Disposition: inline + +It shouldn't cause real harm, but it hurts my eyes. + + +Signed-off-by: Adrian Bunk <bunk@stusta.de> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + include/linux/kobject.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- gregkh-2.6.orig/include/linux/kobject.h ++++ gregkh-2.6/include/linux/kobject.h +@@ -257,7 +257,7 @@ 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) & defined(CONFIG_NET) ++#if defined(CONFIG_HOTPLUG) && defined(CONFIG_NET) + void kobject_uevent(struct kobject *kobj, enum kobject_action action); + + int add_uevent_var(char **envp, int num_envp, int *cur_index, diff --git a/driver/sysfs-fix-problem-with-duplicate-sysfs-directories-and-files.patch b/driver/sysfs-fix-problem-with-duplicate-sysfs-directories-and-files.patch new file mode 100644 index 0000000000000..c0ffacdb61643 --- /dev/null +++ b/driver/sysfs-fix-problem-with-duplicate-sysfs-directories-and-files.patch @@ -0,0 +1,113 @@ +From maneesh@in.ibm.com Thu Mar 9 06:13:04 2006 +Date: Thu, 9 Mar 2006 19:40:14 +0530 +From: Maneesh Soni <maneesh@in.ibm.com> +To: Greg KH <greg@kroah.com> +Cc: Patrick Mochel <mochel@digitalimplant.org> +Subject: sysfs: fix problem with duplicate sysfs directories and files +Message-ID: <20060309141014.GB10667@in.ibm.com> +Content-Disposition: inline + + +The following patch checks for existing sysfs_dirent before +preparing new one while creating sysfs directories and files. + +Signed-off-by: Maneesh Soni <maneesh@in.ibm.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> +--- + fs/sysfs/dir.c | 30 +++++++++++++++++++++++++++++- + fs/sysfs/file.c | 6 ++++-- + fs/sysfs/symlink.c | 5 +++-- + fs/sysfs/sysfs.h | 1 + + 4 files changed, 37 insertions(+), 5 deletions(-) + +--- gregkh-2.6.orig/fs/sysfs/dir.c ++++ gregkh-2.6/fs/sysfs/dir.c +@@ -51,6 +51,30 @@ static struct sysfs_dirent * sysfs_new_d + return sd; + } + ++/** ++ * ++ * Return -EEXIST if there is already a sysfs element with the same name for ++ * the same parent. ++ * ++ * called with parent inode's i_mutex held ++ */ ++int sysfs_dirent_exist(struct sysfs_dirent *parent_sd, ++ const unsigned char *new) ++{ ++ struct sysfs_dirent * sd; ++ ++ list_for_each_entry(sd, &parent_sd->s_children, s_sibling) { ++ const unsigned char * existing = sysfs_get_name(sd); ++ if (strcmp(existing, new)) ++ continue; ++ else ++ return -EEXIST; ++ } ++ ++ return 0; ++} ++ ++ + int sysfs_make_dirent(struct sysfs_dirent * parent_sd, struct dentry * dentry, + void * element, umode_t mode, int type) + { +@@ -117,7 +141,11 @@ static int create_dir(struct kobject * k + mutex_lock(&p->d_inode->i_mutex); + *d = lookup_one_len(n, p, strlen(n)); + if (!IS_ERR(*d)) { +- error = sysfs_make_dirent(p->d_fsdata, *d, k, mode, SYSFS_DIR); ++ if (sysfs_dirent_exist(p->d_fsdata, n)) ++ error = -EEXIST; ++ else ++ error = sysfs_make_dirent(p->d_fsdata, *d, k, mode, ++ SYSFS_DIR); + if (!error) { + error = sysfs_create(*d, mode, init_dir); + if (!error) { +--- gregkh-2.6.orig/fs/sysfs/file.c ++++ gregkh-2.6/fs/sysfs/file.c +@@ -436,10 +436,12 @@ int sysfs_add_file(struct dentry * dir, + { + struct sysfs_dirent * parent_sd = dir->d_fsdata; + umode_t mode = (attr->mode & S_IALLUGO) | S_IFREG; +- int error = 0; ++ int error = -EEXIST; + + mutex_lock(&dir->d_inode->i_mutex); +- error = sysfs_make_dirent(parent_sd, NULL, (void *) attr, mode, type); ++ if (!sysfs_dirent_exist(parent_sd, attr->name)) ++ error = sysfs_make_dirent(parent_sd, NULL, (void *)attr, ++ mode, type); + mutex_unlock(&dir->d_inode->i_mutex); + + return error; +--- gregkh-2.6.orig/fs/sysfs/symlink.c ++++ gregkh-2.6/fs/sysfs/symlink.c +@@ -82,12 +82,13 @@ exit1: + int sysfs_create_link(struct kobject * kobj, struct kobject * target, const char * name) + { + struct dentry * dentry = kobj->dentry; +- int error = 0; ++ int error = -EEXIST; + + BUG_ON(!kobj || !kobj->dentry || !name); + + mutex_lock(&dentry->d_inode->i_mutex); +- error = sysfs_add_link(dentry, name, target); ++ if (!sysfs_dirent_exist(dentry->d_fsdata, name)) ++ error = sysfs_add_link(dentry, name, target); + mutex_unlock(&dentry->d_inode->i_mutex); + return error; + } +--- gregkh-2.6.orig/fs/sysfs/sysfs.h ++++ gregkh-2.6/fs/sysfs/sysfs.h +@@ -5,6 +5,7 @@ extern kmem_cache_t *sysfs_dir_cachep; + extern struct inode * sysfs_new_inode(mode_t mode, struct sysfs_dirent *); + extern int sysfs_create(struct dentry *, int mode, int (*init)(struct inode *)); + ++extern int sysfs_dirent_exist(struct sysfs_dirent *, const unsigned char *); + extern int sysfs_make_dirent(struct sysfs_dirent *, struct dentry *, void *, + umode_t, int); + |