Skip to content

Commit

Permalink
Driver core: fix devres_release_all() return value
Browse files Browse the repository at this point in the history
Every file should include the headers containing the prototypes for
it's global functions.

Since the GNU C compiler is now able to detect that the function 
prototype of devres_release_all() in the header and the actual function 
disagree regarding the return value, this patch also fixes this bug.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Adrian Bunk authored and Greg Kroah-Hartman committed Jul 11, 2007
1 parent ab71c6f commit 2a01345
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/base/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ struct class_device_attribute *to_class_dev_attr(struct attribute *_attr)

extern char *make_class_name(const char *name, struct kobject *kobj);

extern void devres_release_all(struct device *dev);
extern int devres_release_all(struct device *dev);

extern struct kset devices_subsys;
2 changes: 2 additions & 0 deletions drivers/base/devres.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#include <linux/device.h>
#include <linux/module.h>

#include "base.h"

struct devres_node {
struct list_head entry;
dr_release_t release;
Expand Down

0 comments on commit 2a01345

Please sign in to comment.