aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/misc/bma150.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/misc/bma150.c')
-rw-r--r--drivers/input/misc/bma150.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/input/misc/bma150.c b/drivers/input/misc/bma150.c
index e2f1e9f952b..08ffcabd722 100644
--- a/drivers/input/misc/bma150.c
+++ b/drivers/input/misc/bma150.c
@@ -158,7 +158,7 @@ struct bma150_data {
158 * are stated and verified by Bosch Sensortec where they are configured 158 * are stated and verified by Bosch Sensortec where they are configured
159 * to provide a generic sensitivity performance. 159 * to provide a generic sensitivity performance.
160 */ 160 */
161static struct bma150_cfg default_cfg __devinitdata = { 161static struct bma150_cfg default_cfg = {
162 .any_motion_int = 1, 162 .any_motion_int = 1,
163 .hg_int = 1, 163 .hg_int = 1,
164 .lg_int = 1, 164 .lg_int = 1,
@@ -224,7 +224,7 @@ static int bma150_set_mode(struct bma150_data *bma150, u8 mode)
224 return 0; 224 return 0;
225} 225}
226 226
227static int __devinit bma150_soft_reset(struct bma150_data *bma150) 227static int bma150_soft_reset(struct bma150_data *bma150)
228{ 228{
229 int error; 229 int error;
230 230
@@ -237,19 +237,19 @@ static int __devinit bma150_soft_reset(struct bma150_data *bma150)
237 return 0; 237 return 0;
238} 238}
239 239
240static int __devinit bma150_set_range(struct bma150_data *bma150, u8 range) 240static int bma150_set_range(struct bma150_data *bma150, u8 range)
241{ 241{
242 return bma150_set_reg_bits(bma150->client, range, BMA150_RANGE_POS, 242 return bma150_set_reg_bits(bma150->client, range, BMA150_RANGE_POS,
243 BMA150_RANGE_MSK, BMA150_RANGE_REG); 243 BMA150_RANGE_MSK, BMA150_RANGE_REG);
244} 244}
245 245
246static int __devinit bma150_set_bandwidth(struct bma150_data *bma150, u8 bw) 246static int bma150_set_bandwidth(struct bma150_data *bma150, u8 bw)
247{ 247{
248 return bma150_set_reg_bits(bma150->client, bw, BMA150_BANDWIDTH_POS, 248 return bma150_set_reg_bits(bma150->client, bw, BMA150_BANDWIDTH_POS,
249 BMA150_BANDWIDTH_MSK, BMA150_BANDWIDTH_REG); 249 BMA150_BANDWIDTH_MSK, BMA150_BANDWIDTH_REG);
250} 250}
251 251
252static int __devinit bma150_set_low_g_interrupt(struct bma150_data *bma150, 252static int bma150_set_low_g_interrupt(struct bma150_data *bma150,
253 u8 enable, u8 hyst, u8 dur, u8 thres) 253 u8 enable, u8 hyst, u8 dur, u8 thres)
254{ 254{
255 int error; 255 int error;
@@ -273,7 +273,7 @@ static int __devinit bma150_set_low_g_interrupt(struct bma150_data *bma150,
273 BMA150_LOW_G_EN_REG); 273 BMA150_LOW_G_EN_REG);
274} 274}
275 275
276static int __devinit bma150_set_high_g_interrupt(struct bma150_data *bma150, 276static int bma150_set_high_g_interrupt(struct bma150_data *bma150,
277 u8 enable, u8 hyst, u8 dur, u8 thres) 277 u8 enable, u8 hyst, u8 dur, u8 thres)
278{ 278{
279 int error; 279 int error;
@@ -300,7 +300,7 @@ static int __devinit bma150_set_high_g_interrupt(struct bma150_data *bma150,
300} 300}
301 301
302 302
303static int __devinit bma150_set_any_motion_interrupt(struct bma150_data *bma150, 303static int bma150_set_any_motion_interrupt(struct bma150_data *bma150,
304 u8 enable, u8 dur, u8 thres) 304 u8 enable, u8 dur, u8 thres)
305{ 305{
306 int error; 306 int error;
@@ -424,7 +424,7 @@ static void bma150_poll_close(struct input_polled_dev *ipoll_dev)
424 bma150_close(bma150); 424 bma150_close(bma150);
425} 425}
426 426
427static int __devinit bma150_initialize(struct bma150_data *bma150, 427static int bma150_initialize(struct bma150_data *bma150,
428 const struct bma150_cfg *cfg) 428 const struct bma150_cfg *cfg)
429{ 429{
430 int error; 430 int error;
@@ -465,7 +465,7 @@ static int __devinit bma150_initialize(struct bma150_data *bma150,
465 return bma150_set_mode(bma150, BMA150_MODE_SLEEP); 465 return bma150_set_mode(bma150, BMA150_MODE_SLEEP);
466} 466}
467 467
468static void __devinit bma150_init_input_device(struct bma150_data *bma150, 468static void bma150_init_input_device(struct bma150_data *bma150,
469 struct input_dev *idev) 469 struct input_dev *idev)
470{ 470{
471 idev->name = BMA150_DRIVER; 471 idev->name = BMA150_DRIVER;
@@ -479,7 +479,7 @@ static void __devinit bma150_init_input_device(struct bma150_data *bma150,
479 input_set_abs_params(idev, ABS_Z, ABSMIN_ACC_VAL, ABSMAX_ACC_VAL, 0, 0); 479 input_set_abs_params(idev, ABS_Z, ABSMIN_ACC_VAL, ABSMAX_ACC_VAL, 0, 0);
480} 480}
481 481
482static int __devinit bma150_register_input_device(struct bma150_data *bma150) 482static int bma150_register_input_device(struct bma150_data *bma150)
483{ 483{
484 struct input_dev *idev; 484 struct input_dev *idev;
485 int error; 485 int error;
@@ -504,7 +504,7 @@ static int __devinit bma150_register_input_device(struct bma150_data *bma150)
504 return 0; 504 return 0;
505} 505}
506 506
507static int __devinit bma150_register_polled_device(struct bma150_data *bma150) 507static int bma150_register_polled_device(struct bma150_data *bma150)
508{ 508{
509 struct input_polled_dev *ipoll_dev; 509 struct input_polled_dev *ipoll_dev;
510 int error; 510 int error;
@@ -535,7 +535,7 @@ static int __devinit bma150_register_polled_device(struct bma150_data *bma150)
535 return 0; 535 return 0;
536} 536}
537 537
538static int __devinit bma150_probe(struct i2c_client *client, 538static int bma150_probe(struct i2c_client *client,
539 const struct i2c_device_id *id) 539 const struct i2c_device_id *id)
540{ 540{
541 const struct bma150_platform_data *pdata = client->dev.platform_data; 541 const struct bma150_platform_data *pdata = client->dev.platform_data;
@@ -613,7 +613,7 @@ err_free_mem:
613 return error; 613 return error;
614} 614}
615 615
616static int __devexit bma150_remove(struct i2c_client *client) 616static int bma150_remove(struct i2c_client *client)
617{ 617{
618 struct bma150_data *bma150 = i2c_get_clientdata(client); 618 struct bma150_data *bma150 = i2c_get_clientdata(client);
619 619
@@ -670,7 +670,7 @@ static struct i2c_driver bma150_driver = {
670 .class = I2C_CLASS_HWMON, 670 .class = I2C_CLASS_HWMON,
671 .id_table = bma150_id, 671 .id_table = bma150_id,
672 .probe = bma150_probe, 672 .probe = bma150_probe,
673 .remove = __devexit_p(bma150_remove), 673 .remove = bma150_remove,
674}; 674};
675 675
676module_i2c_driver(bma150_driver); 676module_i2c_driver(bma150_driver);