[PATCH] W1: Change the type 'unsigned long' member of 'struct w1_bus_master' to ...
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / drivers / w1 / w1_smem.c
blobe3209d0aca9b6f0832f296a7a0dde6c45175ff0b
1 /*
2 * w1_smem.c
4 * Copyright (c) 2004 Evgeniy Polyakov <johnpol@2ka.mipt.ru>
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.
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.
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
22 #include <asm/types.h>
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>
30 #include "w1.h"
31 #include "w1_io.h"
32 #include "w1_int.h"
33 #include "w1_family.h"
35 MODULE_LICENSE("GPL");
36 MODULE_AUTHOR("Evgeniy Polyakov <johnpol@2ka.mipt.ru>");
37 MODULE_DESCRIPTION("Driver for 1-wire Dallas network protocol, 64bit memory family.");
39 static struct w1_family w1_smem_family_01 = {
40 .fid = W1_FAMILY_SMEM_01,
43 static struct w1_family w1_smem_family_81 = {
44 .fid = W1_FAMILY_SMEM_81,
47 static int __init w1_smem_init(void)
49 int err;
51 err = w1_register_family(&w1_smem_family_01);
52 if (err)
53 return err;
55 err = w1_register_family(&w1_smem_family_81);
56 if (err) {
57 w1_unregister_family(&w1_smem_family_01);
58 return err;
61 return 0;
64 static void __exit w1_smem_fini(void)
66 w1_unregister_family(&w1_smem_family_01);
67 w1_unregister_family(&w1_smem_family_81);
70 module_init(w1_smem_init);
71 module_exit(w1_smem_fini);