Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio:accel:mma9551_core: Move exports into IIO_MMA9551 namespace

In order to avoid unnecessary pollution of the global symbol namespace
move the core mma9551 functions into an mma9551 specific namespace.

For more information see https://lwn.net/Articles/760045/

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20220116180535.2367780-2-jic23@kernel.org

+20 -18
+1
drivers/iio/accel/mma9551.c
··· 622 622 MODULE_AUTHOR("Vlad Dogaru <vlad.dogaru@intel.com>"); 623 623 MODULE_LICENSE("GPL v2"); 624 624 MODULE_DESCRIPTION("MMA9551L motion-sensing platform driver"); 625 + MODULE_IMPORT_NS(IIO_MMA9551);
+18 -18
drivers/iio/accel/mma9551_core.c
··· 219 219 return mma9551_transfer(client, app_id, MMA9551_CMD_READ_CONFIG, 220 220 reg, NULL, 0, val, 1); 221 221 } 222 - EXPORT_SYMBOL(mma9551_read_config_byte); 222 + EXPORT_SYMBOL_NS(mma9551_read_config_byte, IIO_MMA9551); 223 223 224 224 /** 225 225 * mma9551_write_config_byte() - write 1 configuration byte ··· 244 244 return mma9551_transfer(client, app_id, MMA9551_CMD_WRITE_CONFIG, reg, 245 245 &val, 1, NULL, 0); 246 246 } 247 - EXPORT_SYMBOL(mma9551_write_config_byte); 247 + EXPORT_SYMBOL_NS(mma9551_write_config_byte, IIO_MMA9551); 248 248 249 249 /** 250 250 * mma9551_read_status_byte() - read 1 status byte ··· 269 269 return mma9551_transfer(client, app_id, MMA9551_CMD_READ_STATUS, 270 270 reg, NULL, 0, val, 1); 271 271 } 272 - EXPORT_SYMBOL(mma9551_read_status_byte); 272 + EXPORT_SYMBOL_NS(mma9551_read_status_byte, IIO_MMA9551); 273 273 274 274 /** 275 275 * mma9551_read_config_word() - read 1 config word ··· 300 300 301 301 return ret; 302 302 } 303 - EXPORT_SYMBOL(mma9551_read_config_word); 303 + EXPORT_SYMBOL_NS(mma9551_read_config_word, IIO_MMA9551); 304 304 305 305 /** 306 306 * mma9551_write_config_word() - write 1 config word ··· 327 327 return mma9551_transfer(client, app_id, MMA9551_CMD_WRITE_CONFIG, reg, 328 328 (u8 *)&v, 2, NULL, 0); 329 329 } 330 - EXPORT_SYMBOL(mma9551_write_config_word); 330 + EXPORT_SYMBOL_NS(mma9551_write_config_word, IIO_MMA9551); 331 331 332 332 /** 333 333 * mma9551_read_status_word() - read 1 status word ··· 358 358 359 359 return ret; 360 360 } 361 - EXPORT_SYMBOL(mma9551_read_status_word); 361 + EXPORT_SYMBOL_NS(mma9551_read_status_word, IIO_MMA9551); 362 362 363 363 /** 364 364 * mma9551_read_config_words() - read multiple config words ··· 397 397 398 398 return 0; 399 399 } 400 - EXPORT_SYMBOL(mma9551_read_config_words); 400 + EXPORT_SYMBOL_NS(mma9551_read_config_words, IIO_MMA9551); 401 401 402 402 /** 403 403 * mma9551_read_status_words() - read multiple status words ··· 436 436 437 437 return 0; 438 438 } 439 - EXPORT_SYMBOL(mma9551_read_status_words); 439 + EXPORT_SYMBOL_NS(mma9551_read_status_words, IIO_MMA9551); 440 440 441 441 /** 442 442 * mma9551_write_config_words() - write multiple config words ··· 471 471 return mma9551_transfer(client, app_id, MMA9551_CMD_WRITE_CONFIG, 472 472 reg, (u8 *)be_buf, len * sizeof(u16), NULL, 0); 473 473 } 474 - EXPORT_SYMBOL(mma9551_write_config_words); 474 + EXPORT_SYMBOL_NS(mma9551_write_config_words, IIO_MMA9551); 475 475 476 476 /** 477 477 * mma9551_update_config_bits() - update bits in register ··· 507 507 508 508 return mma9551_write_config_byte(client, app_id, reg, tmp); 509 509 } 510 - EXPORT_SYMBOL(mma9551_update_config_bits); 510 + EXPORT_SYMBOL_NS(mma9551_update_config_bits, IIO_MMA9551); 511 511 512 512 /** 513 513 * mma9551_gpio_config() - configure gpio ··· 586 586 587 587 return ret; 588 588 } 589 - EXPORT_SYMBOL(mma9551_gpio_config); 589 + EXPORT_SYMBOL_NS(mma9551_gpio_config, IIO_MMA9551); 590 590 591 591 /** 592 592 * mma9551_read_version() - read device version information ··· 616 616 617 617 return 0; 618 618 } 619 - EXPORT_SYMBOL(mma9551_read_version); 619 + EXPORT_SYMBOL_NS(mma9551_read_version, IIO_MMA9551); 620 620 621 621 /** 622 622 * mma9551_set_device_state() - sets HW power mode ··· 646 646 MMA9551_SLEEP_CFG_FLEEN : 647 647 MMA9551_SLEEP_CFG_SNCEN); 648 648 } 649 - EXPORT_SYMBOL(mma9551_set_device_state); 649 + EXPORT_SYMBOL_NS(mma9551_set_device_state, IIO_MMA9551); 650 650 651 651 /** 652 652 * mma9551_set_power_state() - sets runtime PM state ··· 680 680 681 681 return 0; 682 682 } 683 - EXPORT_SYMBOL(mma9551_set_power_state); 683 + EXPORT_SYMBOL_NS(mma9551_set_power_state, IIO_MMA9551); 684 684 685 685 /** 686 686 * mma9551_sleep() - sleep ··· 699 699 else 700 700 msleep_interruptible(sleep_val); 701 701 } 702 - EXPORT_SYMBOL(mma9551_sleep); 702 + EXPORT_SYMBOL_NS(mma9551_sleep, IIO_MMA9551); 703 703 704 704 /** 705 705 * mma9551_read_accel_chan() - read accelerometer channel ··· 755 755 mma9551_set_power_state(client, false); 756 756 return ret; 757 757 } 758 - EXPORT_SYMBOL(mma9551_read_accel_chan); 758 + EXPORT_SYMBOL_NS(mma9551_read_accel_chan, IIO_MMA9551); 759 759 760 760 /** 761 761 * mma9551_read_accel_scale() - read accelerometer scale ··· 773 773 774 774 return IIO_VAL_INT_PLUS_MICRO; 775 775 } 776 - EXPORT_SYMBOL(mma9551_read_accel_scale); 776 + EXPORT_SYMBOL_NS(mma9551_read_accel_scale, IIO_MMA9551); 777 777 778 778 /** 779 779 * mma9551_app_reset() - reset application ··· 792 792 MMA9551_RSC_OFFSET(app_mask), 793 793 MMA9551_RSC_VAL(app_mask)); 794 794 } 795 - EXPORT_SYMBOL(mma9551_app_reset); 795 + EXPORT_SYMBOL_NS(mma9551_app_reset, IIO_MMA9551); 796 796 797 797 MODULE_AUTHOR("Irina Tirdea <irina.tirdea@intel.com>"); 798 798 MODULE_AUTHOR("Vlad Dogaru <vlad.dogaru@intel.com>");
+1
drivers/iio/accel/mma9553.c
··· 1260 1260 MODULE_AUTHOR("Irina Tirdea <irina.tirdea@intel.com>"); 1261 1261 MODULE_LICENSE("GPL v2"); 1262 1262 MODULE_DESCRIPTION("MMA9553L pedometer platform driver"); 1263 + MODULE_IMPORT_NS(IIO_MMA9551);