]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ARM: pxa: remove use of symbol_get()
authorArnd Bergmann <arnd@arndb.de>
Tue, 1 Aug 2023 17:35:40 +0000 (19:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Sep 2023 08:46:52 +0000 (10:46 +0200)
commit 0faa29c4207e6e29cfc81b427df60e326c37083a upstream.

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 <arnd@arndb.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm/mach-pxa/sharpsl_pm.c
arch/arm/mach-pxa/spitz.c

index 249b7bd5fbc4cf1c2b4b94dbb7a163f9b62a9b39..3ae2eec3710952b2aaae231a9968b3f434a51360 100644 (file)
@@ -224,8 +224,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_)
 {
index 67d66c70257452804ba520ab1a9de46f46bb291e..e9385a80cc6b80802a937b1ab8768cb77cb976d4 100644 (file)
@@ -13,7 +13,6 @@
  */
 
 #include <linux/kernel.h>
-#include <linux/module.h>      /* symbol_get ; symbol_put */
 #include <linux/platform_device.h>
 #include <linux/delay.h>
 #include <linux/gpio_keys.h>
@@ -517,17 +516,6 @@ static struct pxa2xx_spi_chip spitz_ads7846_chip = {
        .gpio_cs                = SPITZ_GPIO_ADS7846_CS,
 };
 
-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 corgi_lcd_platform_data spitz_lcdcon_info = {
        .init_mode              = CORGI_LCD_MODE_VGA,
        .max_intensity          = 0x2f,
@@ -535,7 +523,7 @@ static struct corgi_lcd_platform_data spitz_lcdcon_info = {
        .limit_mask             = 0x0b,
        .gpio_backlight_cont    = SPITZ_GPIO_BACKLIGHT_CONT,
        .gpio_backlight_on      = SPITZ_GPIO_BACKLIGHT_ON,
-       .kick_battery           = spitz_bl_kick_battery,
+       .kick_battery           = sharpsl_battery_kick,
 };
 
 static struct pxa2xx_spi_chip spitz_lcdcon_chip = {