Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4f5b0480 authored by Russell King's avatar Russell King Committed by Linus Torvalds
Browse files

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: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent fa2563e4
Loading
Loading
Loading
Loading
+5 −10
Original line number Diff line number Diff line
@@ -351,7 +351,7 @@ static int bgpio_setup_direction(struct bgpio_chip *bgc,
	return 0;
}

int __devexit bgpio_remove(struct bgpio_chip *bgc)
int bgpio_remove(struct bgpio_chip *bgc)
{
	int err = gpiochip_remove(&bgc->gc);

@@ -361,14 +361,9 @@ int __devexit bgpio_remove(struct bgpio_chip *bgc)
}
EXPORT_SYMBOL_GPL(bgpio_remove);

int __devinit bgpio_init(struct bgpio_chip *bgc,
			 struct device *dev,
			 unsigned long sz,
			 void __iomem *dat,
			 void __iomem *set,
			 void __iomem *clr,
			 void __iomem *dirout,
			 void __iomem *dirin,
int bgpio_init(struct bgpio_chip *bgc, struct device *dev,
	       unsigned long sz, void __iomem *dat, void __iomem *set,
	       void __iomem *clr, void __iomem *dirout, void __iomem *dirin,
	       bool big_endian)
{
	int ret;
+5 −10
Original line number Diff line number Diff line
@@ -63,15 +63,10 @@ static inline struct bgpio_chip *to_bgpio_chip(struct gpio_chip *gc)
	return container_of(gc, struct bgpio_chip, gc);
}

int __devexit bgpio_remove(struct bgpio_chip *bgc);
int __devinit bgpio_init(struct bgpio_chip *bgc,
			 struct device *dev,
			 unsigned long sz,
			 void __iomem *dat,
			 void __iomem *set,
			 void __iomem *clr,
			 void __iomem *dirout,
			 void __iomem *dirin,
int bgpio_remove(struct bgpio_chip *bgc);
int bgpio_init(struct bgpio_chip *bgc, struct device *dev,
	       unsigned long sz, void __iomem *dat, void __iomem *set,
	       void __iomem *clr, void __iomem *dirout, void __iomem *dirin,
	       bool big_endian);

#endif /* __BASIC_MMIO_GPIO_H */