projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
[powerpc.git]
/
fs
/
sysfs
/
bin.c
diff --git
a/fs/sysfs/bin.c
b/fs/sysfs/bin.c
index
78899ee
..
98022e4
100644
(file)
--- a/
fs/sysfs/bin.c
+++ b/
fs/sysfs/bin.c
@@
-10,6
+10,7
@@
#include <linux/errno.h>
#include <linux/fs.h>
#include <linux/errno.h>
#include <linux/fs.h>
+#include <linux/kernel.h>
#include <linux/kobject.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/kobject.h>
#include <linux/module.h>
#include <linux/slab.h>
@@
-163,7
+164,7
@@
static int release(struct inode * inode, struct file * file)
return 0;
}
return 0;
}
-struct file_operations bin_fops = {
+
const
struct file_operations bin_fops = {
.read = read,
.write = write,
.mmap = mmap,
.read = read,
.write = write,
.mmap = mmap,
@@
-176,7
+177,6
@@
struct file_operations bin_fops = {
* sysfs_create_bin_file - create binary file for object.
* @kobj: object.
* @attr: attribute descriptor.
* sysfs_create_bin_file - create binary file for object.
* @kobj: object.
* @attr: attribute descriptor.
- *
*/
int sysfs_create_bin_file(struct kobject * kobj, struct bin_attribute * attr)
*/
int sysfs_create_bin_file(struct kobject * kobj, struct bin_attribute * attr)
@@
-191,13
+191,16
@@
int sysfs_create_bin_file(struct kobject * kobj, struct bin_attribute * attr)
* sysfs_remove_bin_file - remove binary file for object.
* @kobj: object.
* @attr: attribute descriptor.
* sysfs_remove_bin_file - remove binary file for object.
* @kobj: object.
* @attr: attribute descriptor.
- *
*/
*/
-
int
sysfs_remove_bin_file(struct kobject * kobj, struct bin_attribute * attr)
+
void
sysfs_remove_bin_file(struct kobject * kobj, struct bin_attribute * attr)
{
{
- sysfs_hash_and_remove(kobj->dentry,attr->attr.name);
- return 0;
+ if (sysfs_hash_and_remove(kobj->dentry, attr->attr.name) < 0) {
+ printk(KERN_ERR "%s: "
+ "bad dentry or inode or no such file: \"%s\"\n",
+ __FUNCTION__, attr->attr.name);
+ dump_stack();
+ }
}
EXPORT_SYMBOL_GPL(sysfs_create_bin_file);
}
EXPORT_SYMBOL_GPL(sysfs_create_bin_file);