Merge tag 'iio-for-4.1a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio...
[cascardo/linux.git] / drivers / staging / iio / magnetometer / hmc5843_i2c.c
index 6acd614..ff08667 100644 (file)
 #include "hmc5843.h"
 
 static const struct regmap_range hmc5843_readable_ranges[] = {
-               regmap_reg_range(0, HMC5843_ID_END),
+       regmap_reg_range(0, HMC5843_ID_END),
 };
 
-static struct regmap_access_table hmc5843_readable_table = {
-               .yes_ranges = hmc5843_readable_ranges,
-               .n_yes_ranges = ARRAY_SIZE(hmc5843_readable_ranges),
+static const struct regmap_access_table hmc5843_readable_table = {
+       .yes_ranges = hmc5843_readable_ranges,
+       .n_yes_ranges = ARRAY_SIZE(hmc5843_readable_ranges),
 };
 
 static const struct regmap_range hmc5843_writable_ranges[] = {
-               regmap_reg_range(0, HMC5843_MODE_REG),
+       regmap_reg_range(0, HMC5843_MODE_REG),
 };
 
-static struct regmap_access_table hmc5843_writable_table = {
-               .yes_ranges = hmc5843_writable_ranges,
-               .n_yes_ranges = ARRAY_SIZE(hmc5843_writable_ranges),
+static const struct regmap_access_table hmc5843_writable_table = {
+       .yes_ranges = hmc5843_writable_ranges,
+       .n_yes_ranges = ARRAY_SIZE(hmc5843_writable_ranges),
 };
 
 static const struct regmap_range hmc5843_volatile_ranges[] = {
-               regmap_reg_range(HMC5843_DATA_OUT_MSB_REGS, HMC5843_STATUS_REG),
+       regmap_reg_range(HMC5843_DATA_OUT_MSB_REGS, HMC5843_STATUS_REG),
 };
 
-static struct regmap_access_table hmc5843_volatile_table = {
-               .yes_ranges = hmc5843_volatile_ranges,
-               .n_yes_ranges = ARRAY_SIZE(hmc5843_volatile_ranges),
+static const struct regmap_access_table hmc5843_volatile_table = {
+       .yes_ranges = hmc5843_volatile_ranges,
+       .n_yes_ranges = ARRAY_SIZE(hmc5843_volatile_ranges),
 };
 
-static struct regmap_config hmc5843_i2c_regmap_config = {
-               .reg_bits = 8,
-               .val_bits = 8,
+static const struct regmap_config hmc5843_i2c_regmap_config = {
+       .reg_bits = 8,
+       .val_bits = 8,
 
-               .rd_table = &hmc5843_readable_table,
-               .wr_table = &hmc5843_writable_table,
-               .volatile_table = &hmc5843_volatile_table,
+       .rd_table = &hmc5843_readable_table,
+       .wr_table = &hmc5843_writable_table,
+       .volatile_table = &hmc5843_volatile_table,
 
-               .cache_type = REGCACHE_RBTREE,
+       .cache_type = REGCACHE_RBTREE,
 };
 
-static int hmc5843_i2c_probe(struct i2c_client *client,
-                        const struct i2c_device_id *id)
+static int hmc5843_i2c_probe(struct i2c_client *cli,
+                            const struct i2c_device_id *id)
 {
-       return hmc5843_common_probe(&client->dev,
-                       devm_regmap_init_i2c(client, &hmc5843_i2c_regmap_config),
+       return hmc5843_common_probe(&cli->dev,
+                       devm_regmap_init_i2c(cli, &hmc5843_i2c_regmap_config),
                        id->driver_data);
 }