mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-06 22:58:29 +00:00
rtc: rs5c372: remove useless indirection
rs5c372_get_datetime and rs5c372_set_datetime are only used after casting dev to an i2c_client. Remove that useless indirection. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:
parent
57f454fb52
commit
44db5c92a7
1 changed files with 4 additions and 13 deletions
|
@ -207,8 +207,9 @@ static unsigned rs5c_hr2reg(struct rs5c372 *rs5c, unsigned hour)
|
||||||
return bin2bcd(hour);
|
return bin2bcd(hour);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int rs5c372_get_datetime(struct i2c_client *client, struct rtc_time *tm)
|
static int rs5c372_rtc_read_time(struct device *dev, struct rtc_time *tm)
|
||||||
{
|
{
|
||||||
|
struct i2c_client *client = to_i2c_client(dev);
|
||||||
struct rs5c372 *rs5c = i2c_get_clientdata(client);
|
struct rs5c372 *rs5c = i2c_get_clientdata(client);
|
||||||
int status = rs5c_get_regs(rs5c);
|
int status = rs5c_get_regs(rs5c);
|
||||||
|
|
||||||
|
@ -237,8 +238,9 @@ static int rs5c372_get_datetime(struct i2c_client *client, struct rtc_time *tm)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int rs5c372_set_datetime(struct i2c_client *client, struct rtc_time *tm)
|
static int rs5c372_rtc_set_time(struct device *dev, struct rtc_time *tm)
|
||||||
{
|
{
|
||||||
|
struct i2c_client *client = to_i2c_client(dev);
|
||||||
struct rs5c372 *rs5c = i2c_get_clientdata(client);
|
struct rs5c372 *rs5c = i2c_get_clientdata(client);
|
||||||
unsigned char buf[7];
|
unsigned char buf[7];
|
||||||
int addr;
|
int addr;
|
||||||
|
@ -304,17 +306,6 @@ static int rs5c372_get_trim(struct i2c_client *client, int *osc, int *trim)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int rs5c372_rtc_read_time(struct device *dev, struct rtc_time *tm)
|
|
||||||
{
|
|
||||||
return rs5c372_get_datetime(to_i2c_client(dev), tm);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int rs5c372_rtc_set_time(struct device *dev, struct rtc_time *tm)
|
|
||||||
{
|
|
||||||
return rs5c372_set_datetime(to_i2c_client(dev), tm);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static int rs5c_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled)
|
static int rs5c_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled)
|
||||||
{
|
{
|
||||||
struct i2c_client *client = to_i2c_client(dev);
|
struct i2c_client *client = to_i2c_client(dev);
|
||||||
|
|
Loading…
Add table
Reference in a new issue