aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/w1/w1_smem.c16
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>");
37MODULE_DESCRIPTION("Driver for 1-wire Dallas network protocol, 64bit memory family."); 37MODULE_DESCRIPTION("Driver for 1-wire Dallas network protocol, 64bit memory family.");
38 38
39static ssize_t w1_smem_read_name(struct device *, struct device_attribute *attr, char *); 39static ssize_t w1_smem_read_name(struct device *, struct device_attribute *attr, char *);
40static ssize_t w1_smem_read_val(struct device *, struct device_attribute *attr, char *);
41static ssize_t w1_smem_read_bin(struct kobject *, char *, loff_t, size_t); 40static ssize_t w1_smem_read_bin(struct kobject *, char *, loff_t, size_t);
42 41
43static struct w1_family_ops w1_smem_fops = { 42static 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
50static ssize_t w1_smem_read_name(struct device *dev, struct device_attribute *attr, char *buf) 47static 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
57static 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
70static ssize_t w1_smem_read_bin(struct kobject *kobj, char *buf, loff_t off, size_t count) 54static 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),