summaryrefslogtreecommitdiffstats
path: root/drivers/w1/w1.h
diff options
context:
space:
mode:
authorEvgeniy Polyakov <johnpol@2ka.mipt.ru>2005-05-20 22:33:25 +0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-06-21 21:43:09 -0700
commit7785925dd8e0d2f389d4a9168f1683c6b249a552 (patch)
tree5772979184dc9e2b811503fab6ed1119f5c9f93a /drivers/w1/w1.h
parent85e941cc9f10316080a16b121d24d329e5c2a65d (diff)
downloadblackbird-op-linux-7785925dd8e0d2f389d4a9168f1683c6b249a552.tar.gz
blackbird-op-linux-7785925dd8e0d2f389d4a9168f1683c6b249a552.zip
[PATCH] w1: cleanups.
- white space changes. - list_for_each_entry/list_for_each_entry_safe and reverse changes. - small coding style changes. - removed redundant NULL checks. - use attribute group and macros instead of direct device attributes. Patch is havily based on work from Adrian Bunk and Dmitry Torokhov, thanks guys. Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/w1/w1.h')
-rw-r--r--drivers/w1/w1.h43
1 files changed, 21 insertions, 22 deletions
diff --git a/drivers/w1/w1.h b/drivers/w1/w1.h
index abbddaf3f8e2..90a2e737d2ca 100644
--- a/drivers/w1/w1.h
+++ b/drivers/w1/w1.h
@@ -1,8 +1,8 @@
/*
- * w1.h
+ * w1.h
*
* Copyright (c) 2004 Evgeniy Polyakov <johnpol@2ka.mipt.ru>
- *
+ *
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -25,9 +25,9 @@
struct w1_reg_num
{
#if defined(__LITTLE_ENDIAN_BITFIELD)
- __u64 family:8,
- id:48,
- crc:8;
+ __u64 family:8,
+ id:48,
+ crc:8;
#elif defined(__BIG_ENDIAN_BITFIELD)
__u64 crc:8,
id:48,
@@ -74,11 +74,11 @@ struct w1_slave
int ttl;
struct w1_master *master;
- struct w1_family *family;
- struct device dev;
- struct completion dev_released;
+ struct w1_family *family;
+ struct device dev;
+ struct completion dev_released;
- struct bin_attribute attr_bin;
+ struct bin_attribute attr_bin;
struct device_attribute attr_name, attr_val;
};
@@ -90,16 +90,16 @@ struct w1_bus_master
u8 (*read_bit)(unsigned long);
void (*write_bit)(unsigned long, u8);
-
+
u8 (*read_byte)(unsigned long);
- void (*write_byte)(unsigned long, u8);
-
+ void (*write_byte)(unsigned long, u8);
+
u8 (*read_block)(unsigned long, u8 *, int);
void (*write_block)(unsigned long, u8 *, int);
-
- u8 (*touch_bit)(unsigned long, u8);
-
- u8 (*reset_bus)(unsigned long);
+
+ u8 (*touch_bit)(unsigned long, u8);
+
+ u8 (*reset_bus)(unsigned long);
void (*search)(unsigned long, w1_slave_found_callback);
};
@@ -123,21 +123,20 @@ struct w1_master
int need_exit;
pid_t kpid;
- struct semaphore mutex;
+ struct semaphore mutex;
struct device_driver *driver;
- struct device dev;
- struct completion dev_released;
- struct completion dev_exited;
+ struct device dev;
+ struct completion dev_released;
+ struct completion dev_exited;
struct w1_bus_master *bus_master;
u32 seq, groups;
- struct sock *nls;
+ struct sock *nls;
};
int w1_create_master_attributes(struct w1_master *);
-void w1_destroy_master_attributes(struct w1_master *);
void w1_search(struct w1_master *dev);
#endif /* __KERNEL__ */
OpenPOWER on IntegriCloud