Skip to content

Commit 0faa29c

Browse files
arndbmcgrof
authored andcommitted
ARM: pxa: remove use of symbol_get()
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/[email protected]/ Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Luis Chamberlain <[email protected]>
1 parent 4b49df6 commit 0faa29c

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

arch/arm/mach-pxa/sharpsl_pm.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,6 @@ void sharpsl_battery_kick(void)
216216
{
217217
schedule_delayed_work(&sharpsl_bat, msecs_to_jiffies(125));
218218
}
219-
EXPORT_SYMBOL(sharpsl_battery_kick);
220-
221219

222220
static void sharpsl_battery_thread(struct work_struct *private_)
223221
{

arch/arm/mach-pxa/spitz.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
*/
1010

1111
#include <linux/kernel.h>
12-
#include <linux/module.h> /* symbol_get ; symbol_put */
1312
#include <linux/platform_device.h>
1413
#include <linux/delay.h>
1514
#include <linux/gpio_keys.h>
@@ -518,17 +517,6 @@ static struct gpiod_lookup_table spitz_ads7846_gpio_table = {
518517
},
519518
};
520519

521-
static void spitz_bl_kick_battery(void)
522-
{
523-
void (*kick_batt)(void);
524-
525-
kick_batt = symbol_get(sharpsl_battery_kick);
526-
if (kick_batt) {
527-
kick_batt();
528-
symbol_put(sharpsl_battery_kick);
529-
}
530-
}
531-
532520
static struct gpiod_lookup_table spitz_lcdcon_gpio_table = {
533521
.dev_id = "spi2.1",
534522
.table = {
@@ -556,7 +544,7 @@ static struct corgi_lcd_platform_data spitz_lcdcon_info = {
556544
.max_intensity = 0x2f,
557545
.default_intensity = 0x1f,
558546
.limit_mask = 0x0b,
559-
.kick_battery = spitz_bl_kick_battery,
547+
.kick_battery = sharpsl_battery_kick,
560548
};
561549

562550
static struct spi_board_info spitz_spi_devices[] = {

0 commit comments

Comments
 (0)