| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Murata ZPA2326 SPI pressure and temperature sensor driver |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (c) 2016 Parrot S.A. |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * Author: Gregor Boirie <gregor.boirie@parrot.com> |
|---|
| 7 | | - * |
|---|
| 8 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 9 | | - * under the terms of the GNU General Public License version 2 as published by |
|---|
| 10 | | - * the Free Software Foundation. |
|---|
| 11 | | - * |
|---|
| 12 | | - * This program is distributed in the hope that it will be useful, but WITHOUT |
|---|
| 13 | | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|---|
| 14 | | - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
|---|
| 15 | | - * more details. |
|---|
| 16 | 8 | */ |
|---|
| 17 | 9 | |
|---|
| 18 | 10 | #include <linux/module.h> |
|---|
| 19 | 11 | #include <linux/regmap.h> |
|---|
| 20 | 12 | #include <linux/spi/spi.h> |
|---|
| 21 | | -#include <linux/of_device.h> |
|---|
| 13 | +#include <linux/mod_devicetable.h> |
|---|
| 22 | 14 | #include "zpa2326.h" |
|---|
| 23 | 15 | |
|---|
| 24 | 16 | /* |
|---|
| .. | .. |
|---|
| 78 | 70 | }; |
|---|
| 79 | 71 | MODULE_DEVICE_TABLE(spi, zpa2326_spi_ids); |
|---|
| 80 | 72 | |
|---|
| 81 | | -#if defined(CONFIG_OF) |
|---|
| 82 | 73 | static const struct of_device_id zpa2326_spi_matches[] = { |
|---|
| 83 | 74 | { .compatible = "murata,zpa2326" }, |
|---|
| 84 | 75 | { } |
|---|
| 85 | 76 | }; |
|---|
| 86 | 77 | MODULE_DEVICE_TABLE(of, zpa2326_spi_matches); |
|---|
| 87 | | -#endif |
|---|
| 88 | 78 | |
|---|
| 89 | 79 | static struct spi_driver zpa2326_spi_driver = { |
|---|
| 90 | 80 | .driver = { |
|---|
| 91 | 81 | .name = "zpa2326-spi", |
|---|
| 92 | | - .of_match_table = of_match_ptr(zpa2326_spi_matches), |
|---|
| 82 | + .of_match_table = zpa2326_spi_matches, |
|---|
| 93 | 83 | .pm = ZPA2326_PM_OPS, |
|---|
| 94 | 84 | }, |
|---|
| 95 | 85 | .probe = zpa2326_probe_spi, |
|---|