Skip to contentSkip to conversation

staging: pi433: Remove stray gpiod_unexport() call

PATCH New Andy Shevchenko 1 participant 1 message May 28, 2023 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: pi433: Remove stray gpiod_unexport() call

There is no gpiod_export() and gpiod_unexport() looks pretty much stray. If user space tools somehow belong to that, they should be fixed, the gpiod_export() and gpiod_unexport() shouldn't be used in a new code, GPIO sysfs is deprecated. That said, and taking into account staging state of the driver, simply drop the stray call.

---
 drivers/staging/pi433/pi433_if.c | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/pi433/pi433_if.c +0 -1
index f08fdf06d566..220e157d4a5e 100644
@@ -1019,7 +1019,6 @@ static int setup_gpio(struct pi433_device *device)
 		}
 
 		/* configure the pin */
-		gpiod_unexport(device->gpiod[i]);
 		retval = gpiod_direction_input(device->gpiod[i]);
 		if (retval)
 			return retval;
Signature · 1 line
2.40.0.1.gaa8946217a0b