From linux-kernel-owner+glk-linux-kernel-3=40m.gmane.org-S1761490AbXFQXnM@vger.kernel.org Mon Jun 25 00:52:01 2007 From: Adrian Bunk Date: Mon, 18 Jun 2007 01:42:54 +0200 Subject: Driver core: fix devres_release_all() return value To: Tejun Heo Cc: Jeff Garzik , linux-kernel@vger.kernel.org Message-ID: <20070617234254.GD3588@stusta.de> Content-Disposition: inline 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 Acked-by: Tejun Heo Signed-off-by: Greg Kroah-Hartman --- linux-2.6.22-rc4-mm2/drivers/base/base.h.old 2007-06-17 15:37:21.000000000 +0200 +++ linux-2.6.22-rc4-mm2/drivers/base/base.h 2007-06-17 15:37:34.000000000 +0200 @@ -44,6 +44,6 @@ 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; --- linux-2.6.22-rc4-mm2/drivers/base/devres.c.old 2007-06-17 15:30:48.000000000 +0200 +++ linux-2.6.22-rc4-mm2/drivers/base/devres.c 2007-06-17 15:31:03.000000000 +0200 @@ -10,6 +10,8 @@ #include #include +#include "base.h" + struct devres_node { struct list_head entry; dr_release_t release;