Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 25541
b: refs/heads/master
c: 015aefb
h: refs/heads/master
i:
  25539: dc4fd99
v: v3
  • Loading branch information
Alessandro Zummo authored and Linus Torvalds committed Apr 11, 2006
1 parent f38f29d commit e205248
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 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: 3903586ab0eeaf363bd33633f0ae4846f03e2db5
refs/heads/master: 015aefbb87f9e6bd5d3c82ece97f7a7ba8f9b66c
22 changes: 12 additions & 10 deletions trunk/drivers/rtc/rtc-x1205.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <linux/rtc.h>
#include <linux/delay.h>

#define DRV_VERSION "1.0.6"
#define DRV_VERSION "1.0.7"

/* Addresses to scan: none. This chip is located at
* 0x6f and uses a two bytes register addressing.
Expand Down Expand Up @@ -473,24 +473,26 @@ static struct rtc_class_ops x1205_rtc_ops = {
static ssize_t x1205_sysfs_show_atrim(struct device *dev,
struct device_attribute *attr, char *buf)
{
int atrim;
int err, atrim;

if (x1205_get_atrim(to_i2c_client(dev), &atrim) == 0)
return sprintf(buf, "%d.%02d pF\n",
atrim / 1000, atrim % 1000);
return 0;
err = x1205_get_atrim(to_i2c_client(dev), &atrim);
if (err)
return err;

return sprintf(buf, "%d.%02d pF\n", atrim / 1000, atrim % 1000);
}
static DEVICE_ATTR(atrim, S_IRUGO, x1205_sysfs_show_atrim, NULL);

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

if (x1205_get_dtrim(to_i2c_client(dev), &dtrim) == 0)
return sprintf(buf, "%d ppm\n", dtrim);
err = x1205_get_dtrim(to_i2c_client(dev), &dtrim);
if (err)
return err;

return 0;
return sprintf(buf, "%d ppm\n", dtrim);
}
static DEVICE_ATTR(dtrim, S_IRUGO, x1205_sysfs_show_dtrim, NULL);

Expand Down

0 comments on commit e205248

Please sign in to comment.