hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/drivers/iio/pressure/zpa2326_spi.c
....@@ -1,24 +1,16 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Murata ZPA2326 SPI pressure and temperature sensor driver
34 *
45 * Copyright (c) 2016 Parrot S.A.
56 *
67 * 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.
168 */
179
1810 #include <linux/module.h>
1911 #include <linux/regmap.h>
2012 #include <linux/spi/spi.h>
21
-#include <linux/of_device.h>
13
+#include <linux/mod_devicetable.h>
2214 #include "zpa2326.h"
2315
2416 /*
....@@ -78,18 +70,16 @@
7870 };
7971 MODULE_DEVICE_TABLE(spi, zpa2326_spi_ids);
8072
81
-#if defined(CONFIG_OF)
8273 static const struct of_device_id zpa2326_spi_matches[] = {
8374 { .compatible = "murata,zpa2326" },
8475 { }
8576 };
8677 MODULE_DEVICE_TABLE(of, zpa2326_spi_matches);
87
-#endif
8878
8979 static struct spi_driver zpa2326_spi_driver = {
9080 .driver = {
9181 .name = "zpa2326-spi",
92
- .of_match_table = of_match_ptr(zpa2326_spi_matches),
82
+ .of_match_table = zpa2326_spi_matches,
9383 .pm = ZPA2326_PM_OPS,
9484 },
9585 .probe = zpa2326_probe_spi,