Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 2669
b: refs/heads/master
c: 85e941c
h: refs/heads/master
i:
  2667: 4c625c2
v: v3
  • Loading branch information
Evgeniy Polyakov authored and Greg Kroah-Hartman committed Jun 22, 2005
1 parent e98ecae commit d5a64cf
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 6 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: 718a538f945a84244a460df434c3f6f04701957b
refs/heads/master: 85e941cc9f10316080a16b121d24d329e5c2a65d
3 changes: 2 additions & 1 deletion trunk/drivers/w1/w1_family.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
#include <asm/atomic.h>

#define W1_FAMILY_DEFAULT 0
#define W1_FAMILY_SMEM 0x01
#define W1_FAMILY_SMEM_01 0x01
#define W1_FAMILY_SMEM_81 0x81
#define W1_THERM_DS18S20 0x10
#define W1_THERM_DS1822 0x22
#define W1_THERM_DS18B20 0x28
Expand Down
26 changes: 22 additions & 4 deletions trunk/drivers/w1/w1_smem.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,19 +99,37 @@ static ssize_t w1_smem_read_bin(struct kobject *kobj, char *buf, loff_t off, siz
return count;
}

static struct w1_family w1_smem_family = {
.fid = W1_FAMILY_SMEM,
static struct w1_family w1_smem_family_01 = {
.fid = W1_FAMILY_SMEM_01,
.fops = &w1_smem_fops,
};

static struct w1_family w1_smem_family_81 = {
.fid = W1_FAMILY_SMEM_81,
.fops = &w1_smem_fops,
};

static int __init w1_smem_init(void)
{
return w1_register_family(&w1_smem_family);
int err;

err = w1_register_family(&w1_smem_family_01);
if (err)
return err;

err = w1_register_family(&w1_smem_family_81);
if (err) {
w1_unregister_family(&w1_smem_family_01);
return err;
}

return 0;
}

static void __exit w1_smem_fini(void)
{
w1_unregister_family(&w1_smem_family);
w1_unregister_family(&w1_smem_family_01);
w1_unregister_family(&w1_smem_family_81);
}

module_init(w1_smem_init);
Expand Down

0 comments on commit d5a64cf

Please sign in to comment.