From patchwork Mon May 28 14:38:35 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Henriques X-Patchwork-Id: 161618 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 9DB09B6FA3 for ; Tue, 29 May 2012 00:38:59 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SZ15l-0006sx-DV; Mon, 28 May 2012 14:38:41 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SZ15h-0006rX-Dw for kernel-team@lists.ubuntu.com; Mon, 28 May 2012 14:38:37 +0000 Received: from 5e0d6bec.bb.sky.com ([94.13.107.236] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SZ15h-0007hb-8C for kernel-team@lists.ubuntu.com; Mon, 28 May 2012 14:38:37 +0000 From: Luis Henriques To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/1] power_supply: Drop usage of nowarn variant of sysfs_create_link() Date: Mon, 28 May 2012 15:38:35 +0100 Message-Id: <1338215915-8064-2-git-send-email-luis.henriques@canonical.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1338215915-8064-1-git-send-email-luis.henriques@canonical.com> References: <1338215915-8064-1-git-send-email-luis.henriques@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com From: Anton Vorontsov BugLink: http://bugs.launchpad.net/bugs/1005264 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 Signed-off-by: Anton Vorontsov (cherry picked from commit 93278d151e7bd35ccd0e083d7f2d8123cbaf36f8) Signed-off-by: Luis Henriques --- drivers/power/power_supply_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);