gpio: Remove unused and obsoleted gpio_export_link()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 2 Jan 2023 21:08:50 +0000 (23:08 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 30 Jan 2023 14:55:29 +0000 (15:55 +0100)
gpio_export_link() is legacy and unused API, remove it for good.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Yanteng Si <siyanteng@loongson.cn>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Documentation/driver-api/gpio/legacy.rst
Documentation/translations/zh_CN/driver-api/gpio/legacy.rst
Documentation/translations/zh_TW/gpio.txt
include/asm-generic/gpio.h
include/linux/gpio.h

index e17910cc3271937c198859a9adcea7c1f3842831..e3e9d26a60ce50a7aecd850796297af39c6274fc 100644 (file)
@@ -735,10 +735,6 @@ requested using gpio_request()::
        /* reverse gpio_export() */
        void gpio_unexport();
 
-       /* create a sysfs link to an exported GPIO node */
-       int gpio_export_link(struct device *dev, const char *name,
-               unsigned gpio)
-
 After a kernel driver requests a GPIO, it may only be made available in
 the sysfs interface by gpio_export().  The driver can control whether the
 signal direction may change.  This helps drivers prevent userspace code
@@ -748,11 +744,6 @@ This explicit exporting can help with debugging (by making some kinds
 of experiments easier), or can provide an always-there interface that's
 suitable for documenting as part of a board support package.
 
-After the GPIO has been exported, gpio_export_link() allows creating
-symlinks from elsewhere in sysfs to the GPIO sysfs node.  Drivers can
-use this to provide the interface under their own device in sysfs with
-a descriptive name.
-
 
 API Reference
 =============
index 6399521d05489ec0e511514d2f1070b4c19e463f..8599e253fcc55c54da1ac715e78f95e210c33088 100644 (file)
@@ -672,10 +672,6 @@ GPIO 控制器的路径类似 /sys/class/gpio/gpiochip42/ (对于从#42 GPIO
        /* gpio_export()的逆操作 */
        void gpio_unexport();
 
-       /* 创建一个 sysfs 连接到已导出的 GPIO 节点 */
-       int gpio_export_link(struct device *dev, const char *name,
-               unsigned gpio)
-
 在一个内核驱动申请一个 GPIO 之后,它可以通过 gpio_export()使其在 sysfs
 接口中可见。该驱动可以控制信号方向是否可修改。这有助于防止用户空间代码无意间
 破坏重要的系统状态。
@@ -683,10 +679,6 @@ GPIO 控制器的路径类似 /sys/class/gpio/gpiochip42/ (对于从#42 GPIO
 这个明确的导出有助于(通过使某些实验更容易来)调试,也可以提供一个始终存在的接口,
 与文档配合作为板级支持包的一部分。
 
-在 GPIO 被导出之后,gpio_export_link()允许在 sysfs 文件系统的任何地方
-创建一个到这个 GPIO sysfs 节点的符号链接。这样驱动就可以通过一个描述性的
-名字,在 sysfs 中他们所拥有的设备下提供一个(到这个 GPIO sysfs 节点的)接口。
-
 
 API参考
 =======
index e3c076dd75a5d3d6de5f0fa54570dfcfd1587631..abd8e4c0973ee854b2397ed6813ba99df2899ddb 100644 (file)
@@ -634,18 +634,9 @@ GPIO 控制器的路徑類似 /sys/class/gpio/gpiochip42/ (對於從#42 GPIO
        /* gpio_export()的逆操作 */
        void gpio_unexport();
 
-       /* 創建一個 sysfs 連接到已導出的 GPIO 節點 */
-       int gpio_export_link(struct device *dev, const char *name,
-               unsigned gpio)
-
 在一個內核驅動申請一個 GPIO 之後,它可以通過 gpio_export()使其在 sysfs
 接口中可見。該驅動可以控制信號方向是否可修改。這有助於防止用戶空間代碼無意間
 破壞重要的系統狀態。
 
 這個明確的導出有助於(通過使某些實驗更容易來)調試,也可以提供一個始終存在的接口,
 與文檔配合作爲板級支持包的一部分。
-
-在 GPIO 被導出之後,gpio_export_link()允許在 sysfs 文件系統的任何地方
-創建一個到這個 GPIO sysfs 節點的符號連結。這樣驅動就可以通過一個描述性的
-名字,在 sysfs 中他們所擁有的設備下提供一個(到這個 GPIO sysfs 節點的)接口。
-
index a7752cf152ce4cc7ad89990076050ed798f73cfb..f79220f614aad8dd1e0375cb366f794687113137 100644 (file)
@@ -103,12 +103,6 @@ static inline int gpio_export(unsigned gpio, bool direction_may_change)
        return gpiod_export(gpio_to_desc(gpio), direction_may_change);
 }
 
-static inline int gpio_export_link(struct device *dev, const char *name,
-                                  unsigned gpio)
-{
-       return gpiod_export_link(dev, name, gpio_to_desc(gpio));
-}
-
 static inline void gpio_unexport(unsigned gpio)
 {
        gpiod_unexport(gpio_to_desc(gpio));
index 346f60bbab3027464a6567e6be312c68c98cdaa5..e94815b3ce1d62e4b1e183b1ffed3b619f6c6621 100644 (file)
@@ -197,14 +197,6 @@ static inline int gpio_export(unsigned gpio, bool direction_may_change)
        return -EINVAL;
 }
 
-static inline int gpio_export_link(struct device *dev, const char *name,
-                               unsigned gpio)
-{
-       /* GPIO can never have been exported */
-       WARN_ON(1);
-       return -EINVAL;
-}
-
 static inline void gpio_unexport(unsigned gpio)
 {
        /* GPIO can never have been exported */