diff options
author | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2016-03-02 05:25:43 -0500 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2016-03-14 12:08:30 -0400 |
commit | 2da424af4531c4469408136772d6d5e0f8df748b (patch) | |
tree | c655f9d3d02bae84e6cb4d9c1b32c726392fa8af /drivers/rtc | |
parent | a2892bf4456ef2c57a03b48cf09476bedee140f1 (diff) |
rtc: pcf85063: remove struct pcf85063
No members of struct pcf85063 are used anymore, remove the whole structure.
Reviewed-by: Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/rtc-pcf85063.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/drivers/rtc/rtc-pcf85063.c b/drivers/rtc/rtc-pcf85063.c index 550f67518c5a..e8ddbb359d11 100644 --- a/drivers/rtc/rtc-pcf85063.c +++ b/drivers/rtc/rtc-pcf85063.c | |||
@@ -31,11 +31,6 @@ | |||
31 | 31 | ||
32 | static struct i2c_driver pcf85063_driver; | 32 | static struct i2c_driver pcf85063_driver; |
33 | 33 | ||
34 | struct pcf85063 { | ||
35 | struct rtc_device *rtc; | ||
36 | int voltage_low; /* indicates if a low_voltage was detected */ | ||
37 | }; | ||
38 | |||
39 | static int pcf85063_stop_clock(struct i2c_client *client, u8 *ctrl1) | 34 | static int pcf85063_stop_clock(struct i2c_client *client, u8 *ctrl1) |
40 | { | 35 | { |
41 | s32 ret; | 36 | s32 ret; |
@@ -168,25 +163,18 @@ static const struct rtc_class_ops pcf85063_rtc_ops = { | |||
168 | static int pcf85063_probe(struct i2c_client *client, | 163 | static int pcf85063_probe(struct i2c_client *client, |
169 | const struct i2c_device_id *id) | 164 | const struct i2c_device_id *id) |
170 | { | 165 | { |
171 | struct pcf85063 *pcf85063; | 166 | struct rtc_device *rtc; |
172 | 167 | ||
173 | dev_dbg(&client->dev, "%s\n", __func__); | 168 | dev_dbg(&client->dev, "%s\n", __func__); |
174 | 169 | ||
175 | if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) | 170 | if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) |
176 | return -ENODEV; | 171 | return -ENODEV; |
177 | 172 | ||
178 | pcf85063 = devm_kzalloc(&client->dev, sizeof(struct pcf85063), | 173 | rtc = devm_rtc_device_register(&client->dev, |
179 | GFP_KERNEL); | 174 | pcf85063_driver.driver.name, |
180 | if (!pcf85063) | 175 | &pcf85063_rtc_ops, THIS_MODULE); |
181 | return -ENOMEM; | ||
182 | |||
183 | i2c_set_clientdata(client, pcf85063); | ||
184 | |||
185 | pcf85063->rtc = devm_rtc_device_register(&client->dev, | ||
186 | pcf85063_driver.driver.name, | ||
187 | &pcf85063_rtc_ops, THIS_MODULE); | ||
188 | 176 | ||
189 | return PTR_ERR_OR_ZERO(pcf85063->rtc); | 177 | return PTR_ERR_OR_ZERO(rtc); |
190 | } | 178 | } |
191 | 179 | ||
192 | static const struct i2c_device_id pcf85063_id[] = { | 180 | static const struct i2c_device_id pcf85063_id[] = { |