| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * 3-axis magnetometer driver support following SPI Bosch-Sensortec chips: |
|---|
| 3 | 4 | * - BMC150 |
|---|
| .. | .. |
|---|
| 5 | 6 | * - BMM150 |
|---|
| 6 | 7 | * |
|---|
| 7 | 8 | * Copyright (c) 2016, Intel Corporation. |
|---|
| 8 | | - * |
|---|
| 9 | | - * This file is subject to the terms and conditions of version 2 of |
|---|
| 10 | | - * the GNU General Public License. See the file COPYING in the main |
|---|
| 11 | | - * directory of this archive for more details. |
|---|
| 12 | 9 | */ |
|---|
| 13 | 10 | #include <linux/module.h> |
|---|
| 14 | 11 | #include <linux/mod_devicetable.h> |
|---|
| .. | .. |
|---|
| 25 | 22 | |
|---|
| 26 | 23 | regmap = devm_regmap_init_spi(spi, &bmc150_magn_regmap_config); |
|---|
| 27 | 24 | if (IS_ERR(regmap)) { |
|---|
| 28 | | - dev_err(&spi->dev, "Failed to register spi regmap %d\n", |
|---|
| 29 | | - (int)PTR_ERR(regmap)); |
|---|
| 25 | + dev_err(&spi->dev, "Failed to register spi regmap: %pe\n", |
|---|
| 26 | + regmap); |
|---|
| 30 | 27 | return PTR_ERR(regmap); |
|---|
| 31 | 28 | } |
|---|
| 32 | 29 | return bmc150_magn_probe(&spi->dev, regmap, spi->irq, id->name); |
|---|