From patchwork Mon Jul 31 20:34:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13335430 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 576ACC00528 for ; Mon, 31 Jul 2023 20:36:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=5RZ9tkNhih4vvFjUrbk8K8R0qyuE4Wvtsayim12GLAY=; b=PzboxUgPnlJfwV 6ILUap79BQ3pMZmjNv2r2P8RVkzNdPfZnUWOkq48x60iRnS9iMXGbZCrfeTn1Hi+160EQeYKbAnQ3 dVA6sF2vyX3FL1xX6gx3hCGMik5YHVE7RvEczOqQsbOoy3uATd9Ux97j6AZsypIJfBKmNo3TvKomn OZ4FSeL/L+3AFlVBtrXMwlha36V9BNJhmaMY78FIYeBsITseLg/cH4moDh8CzJ/mRFxqU3kzPfpQ/ Oe1Ro9NgDCVD3eloAHHuliVuZJKVgPPs0fd8KcO5MbLJWPJxeh/B75Ctw0sGOz+PIhArEUhXS/02V 5Hezx3zSNRsLlW+6fAwQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qQZcC-00HIXX-1P; Mon, 31 Jul 2023 20:35:40 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qQZc9-00HIWZ-0A for linux-arm-kernel@lists.infradead.org; Mon, 31 Jul 2023 20:35:38 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D95616129A; Mon, 31 Jul 2023 20:35:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A0647C433C8; Mon, 31 Jul 2023 20:35:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690835735; bh=SqoZhNkMbULZnSpK8mWm/QgqaYLUyltlcxLo45LuySM=; h=From:To:Cc:Subject:Date:From; b=rccM63VZ46bK2fuV/vc1E6kASLsXmhqw0Lw7Ufc09lcQJSp1VDFeRS5CNcznXnpi/ nHoEGklyyK7dLDG+CyWtUUu2KjhPaB2LFQy0TMmbvDk3nvE1Z9SXZ2hvhhCnnpXM8f hCa63pkPTl0IquhDW7+T2pXi6mS06aRZawnjwOA4ot6+U6VvJwBtrxynFOX8MwoCr/ khJ48UUxKIs9ztfEomQ9mPzXB9ycT6/Q1QI2A6vVeqFbhchsTG6sNfubhvkpQfoxbA 2wm8t5uB47QAiQhKNqfSx+9Y0agft6WqMdlJzK+nDIt/lKJIo1hwieXqkMLwsohFSd Q3jJ2f9DhPdZA== From: Arnd Bergmann To: Christoph Hellwig , Daniel Mack , Haojian Zhuang , Robert Jarzmik Cc: Arnd Bergmann , Linus Walleij , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] ARM: pxa: remove use of symbol_get() Date: Mon, 31 Jul 2023 22:34:57 +0200 Message-Id: <20230731203527.424561-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230731_133537_155995_CD919334 X-CRM114-Status: GOOD ( 18.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Arnd Bergmann The spitz board file uses the obscure symbol_get() function to optionally call a function from sharpsl_pm.c if that is built. However, the two files are always built together these days, and have been for a long time, so this can be changed to a normal function call. Link: https://lore.kernel.org/lkml/20230731162639.GA9441@lst.de/ Signed-off-by: Arnd Bergmann --- This should get merged along with Christoph's other patches for updating the symbol_get() references to use EXPORT_SYMBOL_GPL(). --- arch/arm/mach-pxa/sharpsl_pm.c | 2 -- arch/arm/mach-pxa/spitz.c | 14 +------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/arch/arm/mach-pxa/sharpsl_pm.c b/arch/arm/mach-pxa/sharpsl_pm.c index d29bdcd5270e0..72fa2e3fd3531 100644 --- a/arch/arm/mach-pxa/sharpsl_pm.c +++ b/arch/arm/mach-pxa/sharpsl_pm.c @@ -216,8 +216,6 @@ void sharpsl_battery_kick(void) { schedule_delayed_work(&sharpsl_bat, msecs_to_jiffies(125)); } -EXPORT_SYMBOL(sharpsl_battery_kick); - static void sharpsl_battery_thread(struct work_struct *private_) { diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index b88ab6d007b68..dd6d66c913701 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c @@ -9,7 +9,6 @@ */ #include -#include /* symbol_get ; symbol_put */ #include #include #include @@ -518,17 +517,6 @@ static struct gpiod_lookup_table spitz_ads7846_gpio_table = { }, }; -static void spitz_bl_kick_battery(void) -{ - void (*kick_batt)(void); - - kick_batt = symbol_get(sharpsl_battery_kick); - if (kick_batt) { - kick_batt(); - symbol_put(sharpsl_battery_kick); - } -} - static struct gpiod_lookup_table spitz_lcdcon_gpio_table = { .dev_id = "spi2.1", .table = { @@ -556,7 +544,7 @@ static struct corgi_lcd_platform_data spitz_lcdcon_info = { .max_intensity = 0x2f, .default_intensity = 0x1f, .limit_mask = 0x0b, - .kick_battery = spitz_bl_kick_battery, + .kick_battery = sharpsl_battery_kick, }; static struct spi_board_info spitz_spi_devices[] = {