summaryrefslogtreecommitdiffstats
path: root/drivers/w1/w1_smem.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/w1/w1_smem.c')
-rw-r--r--drivers/w1/w1_smem.c26
1 files changed, 22 insertions, 4 deletions
diff --git a/drivers/w1/w1_smem.c b/drivers/w1/w1_smem.c
index 674eb75..4a335f1 100644
--- a/drivers/w1/w1_smem.c
+++ b/drivers/w1/w1_smem.c
@@ -99,19 +99,37 @@ out_dec:
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);
OpenPOWER on IntegriCloud