1
0
Fork 0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-01-22 07:53:11 -05:00
linux/drivers/leds
Peter Zijlstra cdd30ebb1b module: Convert symbol namespace to string literal
Clean up the existing export namespace code along the same lines of
commit 33def8498f ("treewide: Convert macro and uses of __section(foo)
to __section("foo")") and for the same reason, it is not desired for the
namespace argument to be a macro expansion itself.

Scripted using

  git grep -l -e MODULE_IMPORT_NS -e EXPORT_SYMBOL_NS | while read file;
  do
    awk -i inplace '
      /^#define EXPORT_SYMBOL_NS/ {
        gsub(/__stringify\(ns\)/, "ns");
        print;
        next;
      }
      /^#define MODULE_IMPORT_NS/ {
        gsub(/__stringify\(ns\)/, "ns");
        print;
        next;
      }
      /MODULE_IMPORT_NS/ {
        $0 = gensub(/MODULE_IMPORT_NS\(([^)]*)\)/, "MODULE_IMPORT_NS(\"\\1\")", "g");
      }
      /EXPORT_SYMBOL_NS/ {
        if ($0 ~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+),/) {
  	if ($0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/ &&
  	    $0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(\)/ &&
  	    $0 !~ /^my/) {
  	  getline line;
  	  gsub(/[[:space:]]*\\$/, "");
  	  gsub(/[[:space:]]/, "", line);
  	  $0 = $0 " " line;
  	}

  	$0 = gensub(/(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/,
  		    "\\1(\\2, \"\\3\")", "g");
        }
      }
      { print }' $file;
  done

Requested-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://mail.google.com/mail/u/2/#inbox/FMfcgzQXKWgMmjdFwwdsfgxzKpVHWPlc
Acked-by: Greg KH <gregkh@linuxfoundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2024-12-02 11:34:44 -08:00
..
blink leds: Switch back to struct platform_driver::remove() 2024-10-15 09:58:10 +01:00
flash module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
rgb - Removed unused local header files from various drivers. 2024-11-22 16:25:20 -08:00
simple leds: Switch back to struct platform_driver::remove() 2024-10-15 09:58:10 +01:00
trigger leds: trigger: netdev: Add support for tx_err and rx_err notification with LEDs 2024-08-01 13:40:01 +01:00
Kconfig leds: blinkm: Fix CONFIG_LEDS_CLASS_MULTICOLOR dependency 2024-08-16 17:04:42 +01:00
led-class-flash.c leds: flash: Remove unused local leds.h 2024-10-09 15:37:33 +01:00
led-class-multicolor.c leds: multicolor: Remove unused local leds.h 2024-10-09 15:37:34 +01:00
led-class.c leds: class: Protect brightness_show() with led_cdev->led_access mutex 2024-11-06 08:42:59 +00:00
led-core.c leds: Introduce ordered workqueue for LEDs events instead of system_wq 2024-11-06 08:11:19 +00:00
led-triggers.c
leds-88pm860x.c leds: Switch back to struct platform_driver::remove() 2024-10-15 09:58:10 +01:00
leds-acer-a500.c
leds-adp5520.c leds: Switch back to struct platform_driver::remove() 2024-10-15 09:58:10 +01:00
leds-an30259a.c
leds-apu.c
leds-ariel.c
leds-aw200xx.c leds: aw200xx: Switch to device_for_each_child_node_scoped() 2024-10-09 15:16:42 +01:00
leds-aw2013.c leds: aw2013: Simplify with scoped for each OF child loop 2024-08-22 14:23:03 +01:00
leds-bcm6328.c leds: bcm6328: Replace divide condition with comparison for shift value 2024-10-31 16:22:23 +00:00
leds-bcm6358.c leds: bcm6358: Simplify with scoped for each OF child loop 2024-08-22 14:23:05 +01:00
leds-bd2606mvv.c leds: bd2606mvv: Fix device child node usage in bd2606mvv_probe() 2024-08-01 13:40:07 +01:00
leds-bd2802.c
leds-blinkm.c leds: Add multicolor support to BlinkM LED driver 2024-08-01 13:40:02 +01:00
leds-cht-wcove.c leds: Switch back to struct platform_driver::remove() 2024-10-15 09:58:10 +01:00
leds-clevo-mail.c leds: Switch back to struct platform_driver::remove() 2024-10-15 09:58:10 +01:00
leds-cobalt-qube.c
leds-cobalt-raq.c
leds-cpcap.c
leds-cr0014114.c leds: cr0014114: Switch to device_for_each_child_node_scoped() 2024-10-09 15:16:59 +01:00
leds-cros_ec.c
leds-da903x.c leds: Switch back to struct platform_driver::remove() 2024-10-15 09:58:10 +01:00
leds-da9052.c leds: Switch back to struct platform_driver::remove() 2024-10-15 09:58:10 +01:00
leds-dac124s085.c
leds-el15203000.c leds: el15203000: Switch to device_for_each_child_node_scoped() 2024-10-09 15:17:06 +01:00
leds-expresswire.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
leds-gpio-register.c leds: leds-gpio-register: Reorganize kerneldoc parameter names 2024-10-10 14:42:33 +01:00
leds-gpio.c - Removed unused local header files from various drivers. 2024-11-22 16:25:20 -08:00
leds-hp6xx.c
leds-ip30.c
leds-ipaq-micro.c
leds-is31fl32xx.c leds: is31fl32xx: Simplify with scoped for each OF child loop 2024-08-22 14:23:06 +01:00
leds-is31fl319x.c leds: is31fl319x: Use device_for_each_child_node_scoped() to access child nodes 2024-08-01 13:40:08 +01:00
leds-lm355x.c
leds-lm3530.c
leds-lm3532.c leds: lm3532: Switch to device_for_each_child_node_scoped() 2024-10-09 15:17:20 +01:00
leds-lm3533.c leds: Switch back to struct platform_driver::remove() 2024-10-15 09:58:10 +01:00
leds-lm3642.c
leds-lm3692x.c
leds-lm3697.c leds: lm3697: Switch to device_for_each_child_node_scoped() 2024-10-09 15:17:27 +01:00
leds-lm36274.c
leds-locomo.c
leds-lp50xx.c leds: lp50xx: Remove unused local leds.h 2024-10-09 15:37:34 +01:00
leds-lp55xx-common.c leds: lp55xx: Remove redundant test for invalid channel number 2024-10-31 15:01:01 +00:00
leds-lp55xx-common.h leds: lp55xx: Use devm_clk_get_enabled() helpers 2024-08-22 14:48:24 +01:00
leds-lp3944.c
leds-lp3952.c
leds-lp5521.c leds: leds-lp55xx: Convert mutex lock/unlock to guard API 2024-07-11 12:46:25 +01:00
leds-lp5523.c leds: leds-lp55xx: Convert mutex lock/unlock to guard API 2024-07-11 12:46:25 +01:00
leds-lp5562.c leds: lp5562: Add multicolor brightness control 2024-10-15 12:58:41 +01:00
leds-lp5569.c leds: leds-lp5569: Enable chip after chip configuration 2024-07-12 08:32:37 +01:00
leds-lp8501.c
leds-lp8788.c
leds-lp8860.c
leds-lt3593.c
leds-max5970.c leds: max5970: Fix unreleased fwnode_handle in probe function 2024-11-06 08:13:14 +00:00
leds-max8997.c
leds-max77650.c leds: max77650: Switch to device_for_each_child_node_scoped() 2024-10-09 15:18:29 +01:00
leds-mc13783.c leds: Switch back to struct platform_driver::remove() 2024-10-15 09:58:10 +01:00
leds-menf21bmc.c
leds-mlxcpld.c
leds-mlxreg.c
leds-mt6323.c leds: Switch back to struct platform_driver::remove() 2024-10-15 09:58:10 +01:00
leds-net48xx.c
leds-netxbig.c leds: netxbig: Simplify with scoped for each OF child loop 2024-08-22 14:23:08 +01:00
leds-nic78bx.c
leds-ns2.c leds: ns2: Switch to device_for_each_child_node_scoped() 2024-10-09 15:18:37 +01:00
leds-ot200.c
leds-pca955x.c
leds-pca963x.c leds: pca963x: Switch to device_for_each_child_node_scoped() 2024-10-09 15:18:44 +01:00
leds-pca995x.c leds: pca995x: Fix device child node usage in pca995x_probe() 2024-08-16 17:01:19 +01:00
leds-pca9532.c leds: pca9532: Remove irrelevant blink configuration error message 2024-08-30 09:01:08 +01:00
leds-pm8058.c
leds-powernv.c leds: Switch back to struct platform_driver::remove() 2024-10-15 09:58:10 +01:00
leds-pwm.c leds: pwm: Add optional DT property default-brightness 2024-11-12 12:14:00 +00:00
leds-rb532.c leds: Switch back to struct platform_driver::remove() 2024-10-15 09:58:10 +01:00
leds-regulator.c leds: Switch back to struct platform_driver::remove() 2024-10-15 09:58:10 +01:00
leds-sc27xx-bltc.c leds: Switch back to struct platform_driver::remove() 2024-10-15 09:58:10 +01:00
leds-spi-byte.c
leds-ss4200.c leds: ss4200: Fix the wrong format specifier for 'blinking' 2024-11-12 14:39:26 +00:00
leds-sun50i-a100.c leds: Switch back to struct platform_driver::remove() 2024-10-15 09:58:10 +01:00
leds-sunfire.c leds: Switch back to struct platform_driver::remove() 2024-10-15 09:58:10 +01:00
leds-syscon.c
leds-tca6507.c leds: tca6507: Switch to device_for_each_child_node_scoped() 2024-10-09 15:19:09 +01:00
leds-ti-lmu-common.c
leds-tlc591xx.c
leds-tps6105x.c
leds-turris-omnia.c leds: turris-omnia: Remove unused local leds.h 2024-10-09 15:37:34 +01:00
leds-wm831x-status.c leds: Switch back to struct platform_driver::remove() 2024-10-15 09:58:10 +01:00
leds-wm8350.c leds: Switch back to struct platform_driver::remove() 2024-10-15 09:58:10 +01:00
leds-wrap.c
leds.h
Makefile
TODO
uleds.c [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00