Skip to content

Commit c8ae273

Browse files
andy-shevalexandrebelloni
authored andcommitted
rtc: isl12022: Drop unneeded OF guards and of_match_ptr()
Drop unneeded OF guards and of_match_ptr(). This allows use of the driver with other types of firmware such as ACPI PRP0001 based probing. Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
1 parent 93219a4 commit c8ae273

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

drivers/rtc/rtc-isl12022.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
#include <linux/slab.h>
1515
#include <linux/module.h>
1616
#include <linux/err.h>
17-
#include <linux/of.h>
18-
#include <linux/of_device.h>
1917
#include <linux/regmap.h>
2018
#include <linux/hwmon.h>
2119

@@ -46,8 +44,6 @@
4644

4745
#define ISL12022_BETA_TSE (1 << 7)
4846

49-
static struct i2c_driver isl12022_driver;
50-
5147
static umode_t isl12022_hwmon_is_visible(const void *data,
5248
enum hwmon_sensor_types type,
5349
u32 attr, int channel)
@@ -252,14 +248,12 @@ static int isl12022_probe(struct i2c_client *client)
252248
return devm_rtc_register_device(rtc);
253249
}
254250

255-
#ifdef CONFIG_OF
256251
static const struct of_device_id isl12022_dt_match[] = {
257252
{ .compatible = "isl,isl12022" }, /* for backward compat., don't use */
258253
{ .compatible = "isil,isl12022" },
259254
{ },
260255
};
261256
MODULE_DEVICE_TABLE(of, isl12022_dt_match);
262-
#endif
263257

264258
static const struct i2c_device_id isl12022_id[] = {
265259
{ "isl12022", 0 },
@@ -270,9 +264,7 @@ MODULE_DEVICE_TABLE(i2c, isl12022_id);
270264
static struct i2c_driver isl12022_driver = {
271265
.driver = {
272266
.name = "rtc-isl12022",
273-
#ifdef CONFIG_OF
274-
.of_match_table = of_match_ptr(isl12022_dt_match),
275-
#endif
267+
.of_match_table = isl12022_dt_match,
276268
},
277269
.probe_new = isl12022_probe,
278270
.id_table = isl12022_id,

0 commit comments

Comments
 (0)