Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 25544
b: refs/heads/master
c: 8289607
h: refs/heads/master
v: v3
  • Loading branch information
Alessandro Zummo authored and Linus Torvalds committed Apr 11, 2006
1 parent 0264a52 commit e68d157
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: adfb4341259f2f89baac2316a8a3660b63c1103b
refs/heads/master: 8289607249ad25ecfc9a3742873fcd8f319d5b09
18 changes: 10 additions & 8 deletions trunk/drivers/rtc/rtc-rs5c372.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,24 +169,26 @@ static struct rtc_class_ops rs5c372_rtc_ops = {
static ssize_t rs5c372_sysfs_show_trim(struct device *dev,
struct device_attribute *attr, char *buf)
{
int trim;
int err, trim;

if (rs5c372_get_trim(to_i2c_client(dev), NULL, &trim) == 0)
return sprintf(buf, "0x%2x\n", trim);
err = rs5c372_get_trim(to_i2c_client(dev), NULL, &trim);
if (err)
return err;

return 0;
return sprintf(buf, "0x%2x\n", trim);
}
static DEVICE_ATTR(trim, S_IRUGO, rs5c372_sysfs_show_trim, NULL);

static ssize_t rs5c372_sysfs_show_osc(struct device *dev,
struct device_attribute *attr, char *buf)
{
int osc;
int err, osc;

if (rs5c372_get_trim(to_i2c_client(dev), &osc, NULL) == 0)
return sprintf(buf, "%d.%03d KHz\n", osc / 1000, osc % 1000);
err = rs5c372_get_trim(to_i2c_client(dev), &osc, NULL);
if (err)
return err;

return 0;
return sprintf(buf, "%d.%03d KHz\n", osc / 1000, osc % 1000);
}
static DEVICE_ATTR(osc, S_IRUGO, rs5c372_sysfs_show_osc, NULL);

Expand Down

0 comments on commit e68d157

Please sign in to comment.