aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/w1/slaves/w1_smem.c
diff options
context:
space:
mode:
authorEvgeniy Polyakov <johnpol@2ka.mipt.ru>2005-12-06 05:38:28 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-23 20:28:11 -0500
commitbd529cfb40c427d5b5aae0d315afb9f0a1da5e76 (patch)
tree54de1d9860defa3c4938fd96246caffe089b9f3a /drivers/w1/slaves/w1_smem.c
parentccd6994000fb6d08ee1be8a7fa20c8d602a2267d (diff)
[PATCH] W1: Move w1 bus master code into 'w1/masters' and move w1 slave code into 'w1/slaves'
Signed-off-by: Ben Gardner <bgardner@wabtec.com> Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/w1/slaves/w1_smem.c')
-rw-r--r--drivers/w1/slaves/w1_smem.c71
1 files changed, 71 insertions, 0 deletions
diff --git a/drivers/w1/slaves/w1_smem.c b/drivers/w1/slaves/w1_smem.c
new file mode 100644
index 000000000000..c6d3be54f94c
--- /dev/null
+++ b/drivers/w1/slaves/w1_smem.c
@@ -0,0 +1,71 @@
1/*
2 * w1_smem.c
3 *
4 * Copyright (c) 2004 Evgeniy Polyakov <johnpol@2ka.mipt.ru>
5 *
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the smems of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22#include <asm/types.h>
23
24#include <linux/kernel.h>
25#include <linux/module.h>
26#include <linux/moduleparam.h>
27#include <linux/device.h>
28#include <linux/types.h>
29
30#include "../w1.h"
31#include "../w1_io.h"
32#include "../w1_int.h"
33#include "../w1_family.h"
34
35MODULE_LICENSE("GPL");
36MODULE_AUTHOR("Evgeniy Polyakov <johnpol@2ka.mipt.ru>");
37MODULE_DESCRIPTION("Driver for 1-wire Dallas network protocol, 64bit memory family.");
38
39static struct w1_family w1_smem_family_01 = {
40 .fid = W1_FAMILY_SMEM_01,
41};
42
43static struct w1_family w1_smem_family_81 = {
44 .fid = W1_FAMILY_SMEM_81,
45};
46
47static int __init w1_smem_init(void)
48{
49 int err;
50
51 err = w1_register_family(&w1_smem_family_01);
52 if (err)
53 return err;
54
55 err = w1_register_family(&w1_smem_family_81);
56 if (err) {
57 w1_unregister_family(&w1_smem_family_01);
58 return err;
59 }
60
61 return 0;
62}
63
64static void __exit w1_smem_fini(void)
65{
66 w1_unregister_family(&w1_smem_family_01);
67 w1_unregister_family(&w1_smem_family_81);
68}
69
70module_init(w1_smem_init);
71module_exit(w1_smem_fini);