.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Murata ZPA2326 I2C 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/i2c.h> |
---|
21 | | -#include <linux/of_device.h> |
---|
| 13 | +#include <linux/mod_devicetable.h> |
---|
22 | 14 | #include "zpa2326.h" |
---|
23 | 15 | |
---|
24 | 16 | /* |
---|
.. | .. |
---|
74 | 66 | }; |
---|
75 | 67 | MODULE_DEVICE_TABLE(i2c, zpa2326_i2c_ids); |
---|
76 | 68 | |
---|
77 | | -#if defined(CONFIG_OF) |
---|
78 | 69 | static const struct of_device_id zpa2326_i2c_matches[] = { |
---|
79 | 70 | { .compatible = "murata,zpa2326" }, |
---|
80 | 71 | { } |
---|
81 | 72 | }; |
---|
82 | 73 | MODULE_DEVICE_TABLE(of, zpa2326_i2c_matches); |
---|
83 | | -#endif |
---|
84 | 74 | |
---|
85 | 75 | static struct i2c_driver zpa2326_i2c_driver = { |
---|
86 | 76 | .driver = { |
---|
87 | 77 | .name = "zpa2326-i2c", |
---|
88 | | - .of_match_table = of_match_ptr(zpa2326_i2c_matches), |
---|
| 78 | + .of_match_table = zpa2326_i2c_matches, |
---|
89 | 79 | .pm = ZPA2326_PM_OPS, |
---|
90 | 80 | }, |
---|
91 | 81 | .probe = zpa2326_probe_i2c, |
---|