diff options
Diffstat (limited to 'drivers/rtc/rtc-bq32k.c')
| -rw-r--r-- | drivers/rtc/rtc-bq32k.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/rtc/rtc-bq32k.c b/drivers/rtc/rtc-bq32k.c index ef52741000a8..7ad34539be4d 100644 --- a/drivers/rtc/rtc-bq32k.c +++ b/drivers/rtc/rtc-bq32k.c @@ -1,21 +1,19 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Driver for TI BQ32000 RTC. * * Copyright (C) 2009 Semihalf. * Copyright (C) 2014 Pavel Machek <pavel@denx.de> * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * * You can get hardware description at - * http://www.ti.com/lit/ds/symlink/bq32000.pdf + * https://www.ti.com/lit/ds/symlink/bq32000.pdf */ #include <linux/module.h> #include <linux/i2c.h> #include <linux/rtc.h> #include <linux/init.h> +#include <linux/kstrtox.h> #include <linux/errno.h> #include <linux/bcd.h> @@ -252,8 +250,7 @@ static void bq32k_sysfs_unregister(struct device *dev) device_remove_file(dev, &dev_attr_trickle_charge_bypass); } -static int bq32k_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int bq32k_probe(struct i2c_client *client) { struct device *dev = &client->dev; struct rtc_device *rtc; @@ -301,20 +298,18 @@ static int bq32k_probe(struct i2c_client *client, return 0; } -static int bq32k_remove(struct i2c_client *client) +static void bq32k_remove(struct i2c_client *client) { bq32k_sysfs_unregister(&client->dev); - - return 0; } static const struct i2c_device_id bq32k_id[] = { - { "bq32000", 0 }, + { "bq32000" }, { } }; MODULE_DEVICE_TABLE(i2c, bq32k_id); -static const struct of_device_id bq32k_of_match[] = { +static const __maybe_unused struct of_device_id bq32k_of_match[] = { { .compatible = "ti,bq32000" }, { } }; |
