mirror of https://gitee.com/openkylin/linux.git
[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:
parent
2d8331792e
commit
8949d2aa05
|
@ -32,19 +32,16 @@ static struct usb_device_id ds_id_table [] = {
|
|||
};
|
||||
MODULE_DEVICE_TABLE(usb, ds_id_table);
|
||||
|
||||
int ds_probe(struct usb_interface *, const struct usb_device_id *);
|
||||
void ds_disconnect(struct usb_interface *);
|
||||
static int ds_probe(struct usb_interface *, const struct usb_device_id *);
|
||||
static void ds_disconnect(struct usb_interface *);
|
||||
|
||||
int ds_touch_bit(struct ds_device *, u8, u8 *);
|
||||
int ds_read_byte(struct ds_device *, u8 *);
|
||||
int ds_read_bit(struct ds_device *, u8 *);
|
||||
int ds_write_byte(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);
|
||||
static int ds_start_pulse(struct ds_device *, int);
|
||||
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);
|
||||
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]);
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
|
@ -245,6 +243,8 @@ static int ds_send_data(struct ds_device *dev, unsigned char *buf, int len)
|
|||
return err;
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
||||
int ds_stop_pulse(struct ds_device *dev, int limit)
|
||||
{
|
||||
struct ds_status st;
|
||||
|
@ -297,7 +297,9 @@ int ds_detect(struct ds_device *dev, struct ds_status *st)
|
|||
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];
|
||||
int err, count = 0;
|
||||
|
@ -319,10 +321,8 @@ int ds_wait_status(struct ds_device *dev, struct ds_status *st)
|
|||
if (((err > 16) && (buf[0x10] & 0x01)) || count >= 100 || err < 0) {
|
||||
ds_recv_status(dev, st);
|
||||
return -1;
|
||||
}
|
||||
else {
|
||||
} else
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
#if 0
|
||||
int ds_set_speed(struct ds_device *dev, int speed)
|
||||
{
|
||||
int err;
|
||||
|
@ -363,8 +364,9 @@ int ds_set_speed(struct ds_device *dev, int speed)
|
|||
|
||||
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;
|
||||
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);
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
||||
int ds_search(struct ds_device *dev, u64 init, u64 *buf, u8 id_number, int conditional_search)
|
||||
{
|
||||
int err;
|
||||
|
@ -625,7 +629,10 @@ int ds_set_path(struct ds_device *dev, u64 init)
|
|||
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_endpoint_descriptor *endpoint;
|
||||
|
@ -720,7 +727,7 @@ int ds_probe(struct usb_interface *intf, const struct usb_device_id *udev_id)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void ds_disconnect(struct usb_interface *intf)
|
||||
static void ds_disconnect(struct usb_interface *intf)
|
||||
{
|
||||
struct ds_device *dev;
|
||||
|
||||
|
@ -740,7 +747,7 @@ void ds_disconnect(struct usb_interface *intf)
|
|||
ds_dev = NULL;
|
||||
}
|
||||
|
||||
int ds_init(void)
|
||||
static int ds_init(void)
|
||||
{
|
||||
int err;
|
||||
|
||||
|
@ -753,7 +760,7 @@ int ds_init(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void ds_fini(void)
|
||||
static void ds_fini(void)
|
||||
{
|
||||
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_write_byte(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_detect(struct ds_device *, struct ds_status *);
|
||||
int ds_stop_pulse(struct ds_device *, int);
|
||||
struct ds_device * ds_get_device(void);
|
||||
void ds_put_device(struct ds_device *);
|
||||
int ds_write_block(struct ds_device *, u8 *, int);
|
||||
|
|
Loading…
Reference in New Issue