ChangeSet 1.738.5.28, 2002/10/13 13:50:55-07:00, ahaas@neosoft.com [PATCH] C99 designated initializers for drivers/usb Hi. Here's a set of three patches for switching ... drivers/usb/serial/io_ti.c drivers/usb/net/usbnet.c drivers/usb/core/hub.c ... to use C99 named initializers. The patches are all against 2.5.42. diff -Nru a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c --- a/drivers/usb/core/hub.c Sun Oct 13 17:08:27 2002 +++ b/drivers/usb/core/hub.c Sun Oct 13 17:08:27 2002 @@ -1069,10 +1069,10 @@ } static struct usb_device_id hub_id_table [] = { - { match_flags: USB_DEVICE_ID_MATCH_DEV_CLASS, - bDeviceClass: USB_CLASS_HUB}, - { match_flags: USB_DEVICE_ID_MATCH_INT_CLASS, - bInterfaceClass: USB_CLASS_HUB}, + { .match_flags = USB_DEVICE_ID_MATCH_DEV_CLASS, + .bDeviceClass = USB_CLASS_HUB}, + { .match_flags = USB_DEVICE_ID_MATCH_INT_CLASS, + .bInterfaceClass = USB_CLASS_HUB}, { } /* Terminating entry */ }; diff -Nru a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c --- a/drivers/usb/net/usbnet.c Sun Oct 13 17:08:27 2002 +++ b/drivers/usb/net/usbnet.c Sun Oct 13 17:08:27 2002 @@ -2092,7 +2092,7 @@ #ifdef CONFIG_USB_EPSON2888 { USB_DEVICE (0x0525, 0x2888), // EPSON USB client - driver_info: (unsigned long) &epson2888_info, + .driver_info = (unsigned long) &epson2888_info, }, #endif diff -Nru a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c --- a/drivers/usb/serial/io_ti.c Sun Oct 13 17:08:27 2002 +++ b/drivers/usb/serial/io_ti.c Sun Oct 13 17:08:27 2002 @@ -2617,47 +2617,47 @@ static struct usb_serial_device_type edgeport_1port_device = { - owner: THIS_MODULE, - name: "Edgeport TI 1 port adapter", - id_table: edgeport_1port_id_table, - num_interrupt_in: 1, - num_bulk_in: 1, - num_bulk_out: 1, - num_ports: 1, - open: edge_open, - close: edge_close, - throttle: edge_throttle, - unthrottle: edge_unthrottle, - attach: edge_startup, - shutdown: edge_shutdown, - ioctl: edge_ioctl, - set_termios: edge_set_termios, - write: edge_write, - write_room: edge_write_room, - chars_in_buffer: edge_chars_in_buffer, - break_ctl: edge_break, + .owner = THIS_MODULE, + .name = "Edgeport TI 1 port adapter", + .id_table = edgeport_1port_id_table, + .num_interrupt_in = 1, + .num_bulk_in = 1, + .num_bulk_out = 1, + .num_ports = 1, + .open = edge_open, + .close = edge_close, + .throttle = edge_throttle, + .unthrottle = edge_unthrottle, + .attach = edge_startup, + .shutdown = edge_shutdown, + .ioctl = edge_ioctl, + .set_termios = edge_set_termios, + .write = edge_write, + .write_room = edge_write_room, + .chars_in_buffer = edge_chars_in_buffer, + .break_ctl = edge_break, }; static struct usb_serial_device_type edgeport_2port_device = { - owner: THIS_MODULE, - name: "Edgeport TI 2 port adapter", - id_table: edgeport_2port_id_table, - num_interrupt_in: 1, - num_bulk_in: 2, - num_bulk_out: 2, - num_ports: 2, - open: edge_open, - close: edge_close, - throttle: edge_throttle, - unthrottle: edge_unthrottle, - attach: edge_startup, - shutdown: edge_shutdown, - ioctl: edge_ioctl, - set_termios: edge_set_termios, - write: edge_write, - write_room: edge_write_room, - chars_in_buffer: edge_chars_in_buffer, - break_ctl: edge_break, + .owner = THIS_MODULE, + .name = "Edgeport TI 2 port adapter", + .id_table = edgeport_2port_id_table, + .num_interrupt_in = 1, + .num_bulk_in = 2, + .num_bulk_out = 2, + .num_ports = 2, + .open = edge_open, + .close = edge_close, + .throttle = edge_throttle, + .unthrottle = edge_unthrottle, + .attach = edge_startup, + .shutdown = edge_shutdown, + .ioctl = edge_ioctl, + .set_termios = edge_set_termios, + .write = edge_write, + .write_room = edge_write_room, + .chars_in_buffer = edge_chars_in_buffer, + .break_ctl = edge_break, };