Skip to content

Commit 4f5b048

Browse files
Russell Kingtorvalds
authored andcommitted
drivers/gpio/gpio-generic.c: fix build errors
Building a kernel with hotplug disabled results in a link failure: `bgpio_remove' referenced in section `___ksymtab_gpl+bgpio_remove' of drivers/built-in.o: defined in discarded section `.devexit.text' of drivers/built-in.o This is because of bgpio_remove() is exported. It is illegal to export symbols which are discarded either at link time or as part of an init/exit section. Fix this by dropping the __devexit attributation from bgpio_remove(). Also drop the __devinit attributation from bgpio_init(). Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Cc: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent fa2563e commit 4f5b048

2 files changed

Lines changed: 10 additions & 20 deletions

File tree

‎drivers/gpio/gpio-generic.c‎

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ static int bgpio_setup_direction(struct bgpio_chip *bgc,
351351
return 0;
352352
}
353353

354-
int __devexit bgpio_remove(struct bgpio_chip *bgc)
354+
int bgpio_remove(struct bgpio_chip *bgc)
355355
{
356356
int err = gpiochip_remove(&bgc->gc);
357357

@@ -361,15 +361,10 @@ int __devexit bgpio_remove(struct bgpio_chip *bgc)
361361
}
362362
EXPORT_SYMBOL_GPL(bgpio_remove);
363363

364-
int __devinit bgpio_init(struct bgpio_chip *bgc,
365-
struct device *dev,
366-
unsigned long sz,
367-
void __iomem *dat,
368-
void __iomem *set,
369-
void __iomem *clr,
370-
void __iomem *dirout,
371-
void __iomem *dirin,
372-
bool big_endian)
364+
int bgpio_init(struct bgpio_chip *bgc, struct device *dev,
365+
unsigned long sz, void __iomem *dat, void __iomem *set,
366+
void __iomem *clr, void __iomem *dirout, void __iomem *dirin,
367+
bool big_endian)
373368
{
374369
int ret;
375370

‎include/linux/basic_mmio_gpio.h‎

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,10 @@ static inline struct bgpio_chip *to_bgpio_chip(struct gpio_chip *gc)
6363
return container_of(gc, struct bgpio_chip, gc);
6464
}
6565

66-
int __devexit bgpio_remove(struct bgpio_chip *bgc);
67-
int __devinit bgpio_init(struct bgpio_chip *bgc,
68-
struct device *dev,
69-
unsigned long sz,
70-
void __iomem *dat,
71-
void __iomem *set,
72-
void __iomem *clr,
73-
void __iomem *dirout,
74-
void __iomem *dirin,
75-
bool big_endian);
66+
int bgpio_remove(struct bgpio_chip *bgc);
67+
int bgpio_init(struct bgpio_chip *bgc, struct device *dev,
68+
unsigned long sz, void __iomem *dat, void __iomem *set,
69+
void __iomem *clr, void __iomem *dirout, void __iomem *dirin,
70+
bool big_endian);
7671

7772
#endif /* __BASIC_MMIO_GPIO_H */

0 commit comments

Comments
 (0)