linux/drivers/iio/humidity
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
..
am2315.c iio: humidity: am2315: make use of iio_for_each_active_channel() 2024-08-03 10:13:40 +01:00
dht11.c iio: humidity: dht11: Switch from of headers to mod_devicetable.h 2022-02-06 15:21:43 +00:00
ens210.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
hdc100x.c iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00
hdc2010.c iio: Switch i2c drivers back to use .probe() 2023-05-21 18:54:53 +01:00
hdc3020.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
hid-sensor-humidity.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
hts221_buffer.c iio: humidity: hts221: use irq_get_trigger_type() 2024-09-30 09:20:58 +01:00
hts221_core.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
hts221_i2c.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
hts221_spi.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
hts221.h iio: humidity: hts211: Use devm_regulator_get_enable() 2022-11-23 19:44:02 +00:00
htu21.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
Kconfig iio: humidity: Add support for ENS210 2024-08-17 15:37:37 +01:00
Makefile iio: humidity: Add support for ENS210 2024-08-17 15:37:37 +01:00
si7005.c iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00
si7020.c iio: humidity: si7020: add heater support 2024-06-13 19:19:23 +01:00