hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
kernel/drivers/iio/imu/bmi160/bmi160_i2c.c
....@@ -1,11 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0
12 /*
23 * BMI160 - Bosch IMU, I2C bits
34 *
45 * Copyright (c) 2016, Intel Corporation.
5
- *
6
- * This file is subject to the terms and conditions of version 2 of
7
- * the GNU General Public License. See the file COPYING in the main
8
- * directory of this archive for more details.
96 *
107 * 7-bit I2C slave address is:
118 * - 0x68 if SDO is pulled to GND
....@@ -27,8 +24,8 @@
2724
2825 regmap = devm_regmap_init_i2c(client, &bmi160_regmap_config);
2926 if (IS_ERR(regmap)) {
30
- dev_err(&client->dev, "Failed to register i2c regmap %d\n",
31
- (int)PTR_ERR(regmap));
27
+ dev_err(&client->dev, "Failed to register i2c regmap: %pe\n",
28
+ regmap);
3229 return PTR_ERR(regmap);
3330 }
3431
....@@ -36,13 +33,6 @@
3633 name = id->name;
3734
3835 return bmi160_core_probe(&client->dev, regmap, name, false);
39
-}
40
-
41
-static int bmi160_i2c_remove(struct i2c_client *client)
42
-{
43
- bmi160_core_remove(&client->dev);
44
-
45
- return 0;
4636 }
4737
4838 static const struct i2c_device_id bmi160_i2c_id[] = {
....@@ -72,7 +62,6 @@
7262 .of_match_table = of_match_ptr(bmi160_of_match),
7363 },
7464 .probe = bmi160_i2c_probe,
75
- .remove = bmi160_i2c_remove,
7665 .id_table = bmi160_i2c_id,
7766 };
7867 module_i2c_driver(bmi160_i2c_driver);