| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0 |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * BMI160 - Bosch IMU, SPI bits |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (c) 2016, Intel Corporation. |
|---|
| 5 | 6 | * |
|---|
| 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. |
|---|
| 9 | 7 | */ |
|---|
| 10 | 8 | #include <linux/acpi.h> |
|---|
| 11 | 9 | #include <linux/module.h> |
|---|
| .. | .. |
|---|
| 22 | 20 | |
|---|
| 23 | 21 | regmap = devm_regmap_init_spi(spi, &bmi160_regmap_config); |
|---|
| 24 | 22 | 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); |
|---|
| 27 | 25 | return PTR_ERR(regmap); |
|---|
| 28 | 26 | } |
|---|
| 29 | 27 | 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; |
|---|
| 37 | 28 | } |
|---|
| 38 | 29 | |
|---|
| 39 | 30 | static const struct spi_device_id bmi160_spi_id[] = { |
|---|
| .. | .. |
|---|
| 58 | 49 | |
|---|
| 59 | 50 | static struct spi_driver bmi160_spi_driver = { |
|---|
| 60 | 51 | .probe = bmi160_spi_probe, |
|---|
| 61 | | - .remove = bmi160_spi_remove, |
|---|
| 62 | 52 | .id_table = bmi160_spi_id, |
|---|
| 63 | 53 | .driver = { |
|---|
| 64 | 54 | .acpi_match_table = ACPI_PTR(bmi160_acpi_match), |
|---|