diff options
author | Andrew F. Davis <afd@ti.com> | 2017-05-16 15:02:12 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-05-25 18:23:03 +0200 |
commit | 50fa2951bd744d2a82aa33074001efac12d4e1cf (patch) | |
tree | 8290ea3c8a7c7bd26cfea3788f4a632526c2ca92 /drivers/w1/masters/ds2490.c | |
parent | 13b9abfc92be7c4454bff912021b9f835dea6e15 (diff) | |
download | linux-50fa2951bd744d2a82aa33074001efac12d4e1cf.tar.gz linux-50fa2951bd744d2a82aa33074001efac12d4e1cf.tar.bz2 linux-50fa2951bd744d2a82aa33074001efac12d4e1cf.zip |
w1: Organize driver source to natural/common order
Structures and functions should be ordered such that forward declaration
use is minimized.
MODULE_* macros should immediately follow the structures and functions
upon which they act.
Remaining MODULE_* macros should be at the end of the file in
alphabetical order.
Signed-off-by: Andrew F. Davis <afd@ti.com>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/w1/masters/ds2490.c')
-rw-r--r-- | drivers/w1/masters/ds2490.c | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/drivers/w1/masters/ds2490.c b/drivers/w1/masters/ds2490.c index be77b7914fad..d748e34d4ce5 100644 --- a/drivers/w1/masters/ds2490.c +++ b/drivers/w1/masters/ds2490.c @@ -179,28 +179,9 @@ struct ds_status u8 reserved2; }; -static struct usb_device_id ds_id_table [] = { - { USB_DEVICE(0x04fa, 0x2490) }, - { }, -}; -MODULE_DEVICE_TABLE(usb, ds_id_table); - -static int ds_probe(struct usb_interface *, const struct usb_device_id *); -static void ds_disconnect(struct usb_interface *); - -static int ds_send_control(struct ds_device *, u16, u16); -static int ds_send_control_cmd(struct ds_device *, u16, u16); - static LIST_HEAD(ds_devices); static DEFINE_MUTEX(ds_mutex); -static struct usb_driver ds_driver = { - .name = "DS9490R", - .probe = ds_probe, - .disconnect = ds_disconnect, - .id_table = ds_id_table, -}; - static int ds_send_control_cmd(struct ds_device *dev, u16 value, u16 index) { int err; @@ -1108,8 +1089,20 @@ static void ds_disconnect(struct usb_interface *intf) kfree(dev); } +static struct usb_device_id ds_id_table [] = { + { USB_DEVICE(0x04fa, 0x2490) }, + { }, +}; +MODULE_DEVICE_TABLE(usb, ds_id_table); + +static struct usb_driver ds_driver = { + .name = "DS9490R", + .probe = ds_probe, + .disconnect = ds_disconnect, + .id_table = ds_id_table, +}; module_usb_driver(ds_driver); -MODULE_LICENSE("GPL"); MODULE_AUTHOR("Evgeniy Polyakov <zbr@ioremap.net>"); MODULE_DESCRIPTION("DS2490 USB <-> W1 bus master driver (DS9490*)"); +MODULE_LICENSE("GPL"); |