linux/drivers/iio/magnetometer
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
..
af8133j.c iio: magnetometer: fix if () scoped_guard() formatting 2024-11-11 11:49:47 +01:00
ak8974.c iio: magn: ak8974: use irq_get_trigger_type() 2024-09-30 09:20:59 +01:00
ak8975.c iio: magnetometer: ak8975: Add AK09118 support 2024-09-03 18:49:43 +01:00
als31300.c iio: magnetometer: add Allegro MicroSystems ALS31300 3-D Linear Hall Effect driver 2024-11-03 20:33:44 +00:00
bmc150_magn_i2c.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
bmc150_magn_spi.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
bmc150_magn.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
bmc150_magn.h iio:magnetometer:mbc150: Make bmc150_magn_remove() return void 2022-06-11 14:35:27 +01:00
hid-sensor-magn-3d.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
hmc5843_core.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
hmc5843_i2c.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
hmc5843_spi.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
hmc5843.h iio: magn: hmc5843: Move struct dev_pm_ops out of header 2022-08-15 22:30:02 +01:00
Kconfig iio: magnetometer: add Allegro MicroSystems ALS31300 3-D Linear Hall Effect driver 2024-11-03 20:33:44 +00:00
mag3110.c iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00
Makefile iio: magnetometer: add Allegro MicroSystems ALS31300 3-D Linear Hall Effect driver 2024-11-03 20:33:44 +00:00
mmc35240.c iio: magnetometer: mmc35240: make use of regmap_set_bits() 2024-06-25 21:04:47 +01:00
rm3100-core.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
rm3100-i2c.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
rm3100-spi.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
rm3100.h
st_magn_buffer.c
st_magn_core.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
st_magn_i2c.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
st_magn_spi.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
st_magn.h iio: magnetometer: st_magn: Add LSM303C 2023-01-08 13:01:02 +00:00
tmag5273.c iio: tmag5273: Remove some unused field in struct tmag5273_data 2024-05-27 09:48:56 +01:00
yamaha-yas530.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00