forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/iio/imu/bmi160/bmi160_spi.c
....@@ -1,11 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0
12 /*
23 * BMI160 - Bosch IMU, SPI bits
34 *
45 * Copyright (c) 2016, Intel Corporation.
56 *
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.
97 */
108 #include <linux/acpi.h>
119 #include <linux/module.h>
....@@ -22,18 +20,11 @@
2220
2321 regmap = devm_regmap_init_spi(spi, &bmi160_regmap_config);
2422 if (IS_ERR(regmap)) {
25
- dev_err(&spi->dev, "Failed to register spi regmap %d\n",
26
- (int)PTR_ERR(regmap));
23
+ dev_err(&spi->dev, "Failed to register spi regmap: %pe\n",
24
+ regmap);
2725 return PTR_ERR(regmap);
2826 }
2927 return bmi160_core_probe(&spi->dev, regmap, id->name, true);
30
-}
31
-
32
-static int bmi160_spi_remove(struct spi_device *spi)
33
-{
34
- bmi160_core_remove(&spi->dev);
35
-
36
- return 0;
3728 }
3829
3930 static const struct spi_device_id bmi160_spi_id[] = {
....@@ -58,7 +49,6 @@
5849
5950 static struct spi_driver bmi160_spi_driver = {
6051 .probe = bmi160_spi_probe,
61
- .remove = bmi160_spi_remove,
6252 .id_table = bmi160_spi_id,
6353 .driver = {
6454 .acpi_match_table = ACPI_PTR(bmi160_acpi_match),