Skip to contentSkip to conversation

gpiolib.c:undefined reference to `gpiod_unexport'

PATCH Applied Grant Likely 3 participants 4 messages Feb 9, 2013 – Feb 10, 2013 1 message not in the archive GPIO

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 51166e1c.NRfQN8VgI14zuNwf%[email protected]

#1 lore raw

Alex, this is broken when the sysfs interface isn't enabled. Can you send a fixup patch?

g.

Quoted 7 lines · kbuild test robot
tree:   git://git.secretlab.ca/git/linux-2.6.git gpio/next
head:   8a307b35962e42de0f998c6029e8851c61eadb4e
commit: 5bb47609e8167d733786cb781ada29536385635c [10/16] gpiolib: use descriptors internally
config: i386-randconfig-b040 (attached as .config)

All error/warnings:

Quoted 8 lines

drivers/built-in.o: In function `gpiod_free':

Quoted 1 line
Quoted 1 line

gpiolib.c:(.text+0xda3): undefined reference to `gpiod_unexport'

drivers/built-in.o: In function `gpio_request_one':

Quoted 1 line
Quoted 1 line

(.text+0x147f): undefined reference to `gpiod_export'

---
0-DAY kernel build testing backend Open Source Technology Center
http://lists.01.org/mailman/listinfo/kbuild Intel Corporation

--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

#2 lore raw

PATCH 1/1 gpiolib: fix link error when sysfs is not built

From: Alexandre Courbot <[email protected]>

Fix all compilation errors and warnings triggered by my latest series of patch on Grant's linux-next branch. Please meld this patch into the culprit one to avoid ending with a commit that breaks compilation in the git history.

---
 drivers/gpio/gpiolib.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
drivers/gpio/gpiolib.c +21 -0
index b24e820..d283e70 100644
@@ -1087,6 +1087,27 @@ static inline void gpiochip_unexport(struct gpio_chip *chip)
 {
 }
 
+static inline int gpiod_export(struct gpio_desc *desc,
+			       bool direction_may_change)
+{
+	return -ENOSYS;
+}
+
+static inline int gpiod_export_link(struct device *dev, const char *name,
+				    struct gpio_desc *desc)
+{
+	return -ENOSYS;
+}
+
+static inline int gpiod_sysfs_set_active_low(struct gpio_desc *desc, int value)
+{
+	return -ENOSYS;
+}
+
+static inline void gpiod_unexport(struct gpio_desc *desc)
+{
+}
+
 #endif /* CONFIG_GPIO_SYSFS */
 
 /*
Signature · 1 line
1.8.1.3
author Applied
#3 lore raw

Re: [PATCH] gpiolib: fix link error when sysfs is not built

Quoted 7 lines · Alexandre Courbot

From: Alexandre Courbot <[email protected]>

Fix all compilation errors and warnings triggered by my latest series of patch on Grant's linux-next branch. Please meld this patch into the culprit one to avoid ending with a commit that breaks compilation in the git history.

Applied, thanks. I've pushed it out as a separate commit since I had already pushed my tree out. so I need to make sure linusw hasn't pulled it and applied anything on top before I respin.

g.

#4 lore raw
In reply to Grant Likely

Hi Grant,

Quoted 18 lines · Grant Likely

Alex, this is broken when the sysfs interface isn't enabled. Can you send a fixup patch?

g.

Quoted 11 lines · kbuild test robot
tree:   git://git.secretlab.ca/git/linux-2.6.git gpio/next
head:   8a307b35962e42de0f998c6029e8851c61eadb4e
commit: 5bb47609e8167d733786cb781ada29536385635c [10/16] gpiolib: use descriptors internally
config: i386-randconfig-b040 (attached as .config)

All error/warnings:

drivers/built-in.o: In function `gpiod_free':

Quoted 1 line
Quoted 1 line

gpiolib.c:(.text+0xda3): undefined reference to `gpiod_unexport'

drivers/built-in.o: In function `gpio_request_one':

Quoted 1 line
Quoted 1 line

(.text+0x147f): undefined reference to `gpiod_export'

Sorry about that. I have sent you the fix in a separate mail. Please meld it into the culprit commit to fix this.

Thanks,
Alex.