lkml.org 
[lkml]   [2012]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: linux-next: build failure after merge of the battery tree
On Thu, Jan 05, 2012 at 02:40:42PM +1100, Stephen Rothwell wrote:
> Hi Anton,
>
> After merging the battery tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
>
> ERROR: "sysfs_create_link_nowarn" [drivers/power/power_supply.ko] undefined!
>
> Caused by commit 8351665195ce ("power_supply: allow a power supply to
> explicitly point to powered device"). That symbol is not exported to
> modules.
>
> I have used the battery tree from next-20120104 for today.

Thanks for catching this, Stephen!

I wonder why do we need to use _nowarn variant?..

Something tells me that we actually want a warning.

Jeremy, are you OK with the patch down below?

- - - -
From: Anton Vorontsov <cbouatmailru@gmail.com>
Subject: power_supply: Drop usage of nowarn variant of sysfs_create_link()

The function is not exported to modules, plus we do want to catch anyone
who tries to create complex hierarchy (in that case we'd need to change
'powers' symlink to a directory, probably under a different name to not
break ABI).

This patch fixes the following build error:

ERROR: "sysfs_create_link_nowarn" [drivers/power/power_supply.ko] undefined!

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
---
drivers/power/power_supply_core.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/power/power_supply_core.c b/drivers/power/power_supply_core.c
index b10c121..47f4e11 100644
--- a/drivers/power/power_supply_core.c
+++ b/drivers/power/power_supply_core.c
@@ -149,7 +149,7 @@ EXPORT_SYMBOL_GPL(power_supply_get_by_name);

int power_supply_powers(struct power_supply *psy, struct device *dev)
{
- return sysfs_create_link_nowarn(&psy->dev->kobj, &dev->kobj, "powers");
+ return sysfs_create_link(&psy->dev->kobj, &dev->kobj, "powers");
}
EXPORT_SYMBOL_GPL(power_supply_powers);

--
1.7.7.3


\
 
 \ /
  Last update: 2012-01-05 16:27    [W:0.282 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site