diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/w1/w1_smem.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/drivers/w1/w1_smem.c b/drivers/w1/w1_smem.c index 285eb8f84574..70d2d469963c 100644 --- a/drivers/w1/w1_smem.c +++ b/drivers/w1/w1_smem.c | |||
@@ -37,14 +37,11 @@ MODULE_AUTHOR("Evgeniy Polyakov <johnpol@2ka.mipt.ru>"); | |||
37 | MODULE_DESCRIPTION("Driver for 1-wire Dallas network protocol, 64bit memory family."); | 37 | MODULE_DESCRIPTION("Driver for 1-wire Dallas network protocol, 64bit memory family."); |
38 | 38 | ||
39 | static ssize_t w1_smem_read_name(struct device *, struct device_attribute *attr, char *); | 39 | static ssize_t w1_smem_read_name(struct device *, struct device_attribute *attr, char *); |
40 | static ssize_t w1_smem_read_val(struct device *, struct device_attribute *attr, char *); | ||
41 | static ssize_t w1_smem_read_bin(struct kobject *, char *, loff_t, size_t); | 40 | static ssize_t w1_smem_read_bin(struct kobject *, char *, loff_t, size_t); |
42 | 41 | ||
43 | static struct w1_family_ops w1_smem_fops = { | 42 | static struct w1_family_ops w1_smem_fops = { |
44 | .rname = &w1_smem_read_name, | 43 | .rname = &w1_smem_read_name, |
45 | .rbin = &w1_smem_read_bin, | 44 | .rbin = &w1_smem_read_bin, |
46 | .rval = &w1_smem_read_val, | ||
47 | .rvalname = "id", | ||
48 | }; | 45 | }; |
49 | 46 | ||
50 | static ssize_t w1_smem_read_name(struct device *dev, struct device_attribute *attr, char *buf) | 47 | static ssize_t w1_smem_read_name(struct device *dev, struct device_attribute *attr, char *buf) |
@@ -54,19 +51,6 @@ static ssize_t w1_smem_read_name(struct device *dev, struct device_attribute *at | |||
54 | return sprintf(buf, "%s\n", sl->name); | 51 | return sprintf(buf, "%s\n", sl->name); |
55 | } | 52 | } |
56 | 53 | ||
57 | static ssize_t w1_smem_read_val(struct device *dev, struct device_attribute *attr, char *buf) | ||
58 | { | ||
59 | struct w1_slave *sl = container_of(dev, struct w1_slave, dev); | ||
60 | int i; | ||
61 | ssize_t count = 0; | ||
62 | |||
63 | for (i = 0; i < 8; ++i) | ||
64 | count += sprintf(buf + count, "%02x ", ((u8 *)&sl->reg_num)[i]); | ||
65 | count += sprintf(buf + count, "\n"); | ||
66 | |||
67 | return count; | ||
68 | } | ||
69 | |||
70 | static ssize_t w1_smem_read_bin(struct kobject *kobj, char *buf, loff_t off, size_t count) | 54 | static ssize_t w1_smem_read_bin(struct kobject *kobj, char *buf, loff_t off, size_t count) |
71 | { | 55 | { |
72 | struct w1_slave *sl = container_of(container_of(kobj, struct device, kobj), | 56 | struct w1_slave *sl = container_of(container_of(kobj, struct device, kobj), |