linux-next: build failure after merge of the final tree (regulatortree related)

From: Stephen Rothwell
Date: Thu Aug 16 2012 - 01:16:11 EST


Hi all,

After merging the final tree, today's linux-next build (powerpc
allyesconfig) failed like this:

drivers/regulator/twl-regulator.c: In function 'twlreg_probe':
drivers/regulator/twl-regulator.c:1229:3: error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration]

Caused by commit 537fbe92d723 ("regulator: twl: make twl_info tables
const") from the regulator tree.

I have added the following patch for today:

From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Date: Thu, 16 Aug 2012 15:11:22 +1000
Subject: [PATCH] regulator: using kfree() requires including slab.h

Fixes this build error:

drivers/regulator/twl-regulator.c: In function 'twlreg_probe':
drivers/regulator/twl-regulator.c:1229:3: error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration]

Also added string.h for kmemdup().

Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
---
drivers/regulator/twl-regulator.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c
index a836522..564acae 100644
--- a/drivers/regulator/twl-regulator.c
+++ b/drivers/regulator/twl-regulator.c
@@ -10,6 +10,8 @@
*/

#include <linux/module.h>
+#include <linux/string.h>
+#include <linux/slab.h>
#include <linux/init.h>
#include <linux/err.h>
#include <linux/platform_device.h>
--
1.7.10.280.gaa39

--
Cheers,
Stephen Rothwell sfr@xxxxxxxxxxxxxxxx

Attachment: pgp00000.pgp
Description: PGP signature