[PATCH] W1: Sync with w1/ds9490 tree.
Whitespace, static/nonstatic cleanups. Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
2d8331792e
commit
8949d2aa05
@@ -32,19 +32,16 @@ static struct usb_device_id ds_id_table [] = {
|
|||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(usb, ds_id_table);
|
MODULE_DEVICE_TABLE(usb, ds_id_table);
|
||||||
|
|
||||||
int ds_probe(struct usb_interface *, const struct usb_device_id *);
|
static int ds_probe(struct usb_interface *, const struct usb_device_id *);
|
||||||
void ds_disconnect(struct usb_interface *);
|
static void ds_disconnect(struct usb_interface *);
|
||||||
|
|
||||||
int ds_touch_bit(struct ds_device *, u8, u8 *);
|
int ds_touch_bit(struct ds_device *, u8, u8 *);
|
||||||
int ds_read_byte(struct ds_device *, u8 *);
|
int ds_read_byte(struct ds_device *, u8 *);
|
||||||
int ds_read_bit(struct ds_device *, u8 *);
|
int ds_read_bit(struct ds_device *, u8 *);
|
||||||
int ds_write_byte(struct ds_device *, u8);
|
int ds_write_byte(struct ds_device *, u8);
|
||||||
int ds_write_bit(struct ds_device *, u8);
|
int ds_write_bit(struct ds_device *, u8);
|
||||||
int ds_start_pulse(struct ds_device *, int);
|
static int ds_start_pulse(struct ds_device *, int);
|
||||||
int ds_set_speed(struct ds_device *, int);
|
|
||||||
int ds_reset(struct ds_device *, struct ds_status *);
|
int ds_reset(struct ds_device *, struct ds_status *);
|
||||||
int ds_detect(struct ds_device *, struct ds_status *);
|
|
||||||
int ds_stop_pulse(struct ds_device *, int);
|
|
||||||
struct ds_device * ds_get_device(void);
|
struct ds_device * ds_get_device(void);
|
||||||
void ds_put_device(struct ds_device *);
|
void ds_put_device(struct ds_device *);
|
||||||
|
|
||||||
@@ -126,7 +123,8 @@ static inline void ds_dump_status(unsigned char *buf, unsigned char *str, int of
|
|||||||
printk("%45s: %8x\n", str, buf[off]);
|
printk("%45s: %8x\n", str, buf[off]);
|
||||||
}
|
}
|
||||||
|
|
||||||
int ds_recv_status_nodump(struct ds_device *dev, struct ds_status *st, unsigned char *buf, int size)
|
static int ds_recv_status_nodump(struct ds_device *dev, struct ds_status *st,
|
||||||
|
unsigned char *buf, int size)
|
||||||
{
|
{
|
||||||
int count, err;
|
int count, err;
|
||||||
|
|
||||||
@@ -245,6 +243,8 @@ static int ds_send_data(struct ds_device *dev, unsigned char *buf, int len)
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
|
||||||
int ds_stop_pulse(struct ds_device *dev, int limit)
|
int ds_stop_pulse(struct ds_device *dev, int limit)
|
||||||
{
|
{
|
||||||
struct ds_status st;
|
struct ds_status st;
|
||||||
@@ -297,7 +297,9 @@ int ds_detect(struct ds_device *dev, struct ds_status *st)
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ds_wait_status(struct ds_device *dev, struct ds_status *st)
|
#endif /* 0 */
|
||||||
|
|
||||||
|
static int ds_wait_status(struct ds_device *dev, struct ds_status *st)
|
||||||
{
|
{
|
||||||
u8 buf[0x20];
|
u8 buf[0x20];
|
||||||
int err, count = 0;
|
int err, count = 0;
|
||||||
@@ -319,11 +321,9 @@ int ds_wait_status(struct ds_device *dev, struct ds_status *st)
|
|||||||
if (((err > 16) && (buf[0x10] & 0x01)) || count >= 100 || err < 0) {
|
if (((err > 16) && (buf[0x10] & 0x01)) || count >= 100 || err < 0) {
|
||||||
ds_recv_status(dev, st);
|
ds_recv_status(dev, st);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
} else
|
||||||
else {
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
int ds_reset(struct ds_device *dev, struct ds_status *st)
|
int ds_reset(struct ds_device *dev, struct ds_status *st)
|
||||||
{
|
{
|
||||||
@@ -345,6 +345,7 @@ int ds_reset(struct ds_device *dev, struct ds_status *st)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
int ds_set_speed(struct ds_device *dev, int speed)
|
int ds_set_speed(struct ds_device *dev, int speed)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
@@ -363,8 +364,9 @@ int ds_set_speed(struct ds_device *dev, int speed)
|
|||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
#endif /* 0 */
|
||||||
|
|
||||||
int ds_start_pulse(struct ds_device *dev, int delay)
|
static int ds_start_pulse(struct ds_device *dev, int delay)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
u8 del = 1 + (u8)(delay >> 4);
|
u8 del = 1 + (u8)(delay >> 4);
|
||||||
@@ -552,6 +554,8 @@ int ds_write_block(struct ds_device *dev, u8 *buf, int len)
|
|||||||
return !(err == len);
|
return !(err == len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
|
||||||
int ds_search(struct ds_device *dev, u64 init, u64 *buf, u8 id_number, int conditional_search)
|
int ds_search(struct ds_device *dev, u64 init, u64 *buf, u8 id_number, int conditional_search)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
@@ -625,7 +629,10 @@ int ds_set_path(struct ds_device *dev, u64 init)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ds_probe(struct usb_interface *intf, const struct usb_device_id *udev_id)
|
#endif /* 0 */
|
||||||
|
|
||||||
|
static int ds_probe(struct usb_interface *intf,
|
||||||
|
const struct usb_device_id *udev_id)
|
||||||
{
|
{
|
||||||
struct usb_device *udev = interface_to_usbdev(intf);
|
struct usb_device *udev = interface_to_usbdev(intf);
|
||||||
struct usb_endpoint_descriptor *endpoint;
|
struct usb_endpoint_descriptor *endpoint;
|
||||||
@@ -720,7 +727,7 @@ int ds_probe(struct usb_interface *intf, const struct usb_device_id *udev_id)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ds_disconnect(struct usb_interface *intf)
|
static void ds_disconnect(struct usb_interface *intf)
|
||||||
{
|
{
|
||||||
struct ds_device *dev;
|
struct ds_device *dev;
|
||||||
|
|
||||||
@@ -740,7 +747,7 @@ void ds_disconnect(struct usb_interface *intf)
|
|||||||
ds_dev = NULL;
|
ds_dev = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ds_init(void)
|
static int ds_init(void)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
@@ -753,7 +760,7 @@ int ds_init(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ds_fini(void)
|
static void ds_fini(void)
|
||||||
{
|
{
|
||||||
usb_deregister(&ds_driver);
|
usb_deregister(&ds_driver);
|
||||||
}
|
}
|
||||||
|
@@ -156,11 +156,7 @@ int ds_read_byte(struct ds_device *, u8 *);
|
|||||||
int ds_read_bit(struct ds_device *, u8 *);
|
int ds_read_bit(struct ds_device *, u8 *);
|
||||||
int ds_write_byte(struct ds_device *, u8);
|
int ds_write_byte(struct ds_device *, u8);
|
||||||
int ds_write_bit(struct ds_device *, u8);
|
int ds_write_bit(struct ds_device *, u8);
|
||||||
int ds_start_pulse(struct ds_device *, int);
|
|
||||||
int ds_set_speed(struct ds_device *, int);
|
|
||||||
int ds_reset(struct ds_device *, struct ds_status *);
|
int ds_reset(struct ds_device *, struct ds_status *);
|
||||||
int ds_detect(struct ds_device *, struct ds_status *);
|
|
||||||
int ds_stop_pulse(struct ds_device *, int);
|
|
||||||
struct ds_device * ds_get_device(void);
|
struct ds_device * ds_get_device(void);
|
||||||
void ds_put_device(struct ds_device *);
|
void ds_put_device(struct ds_device *);
|
||||||
int ds_write_block(struct ds_device *, u8 *, int);
|
int ds_write_block(struct ds_device *, u8 *, int);
|
||||||
|
Reference in New Issue
Block a user