Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Aug 2009 19:11:18 GMT
From:      Sylvestre Gallon <syl@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 167332 for review
Message-ID:  <200908141911.n7EJBIcS021235@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=167332

Change 167332 by syl@syl_twoflowers on 2009/08/14 19:11:02

	On Hans Petter advices replace DEFAULT_ROOTHUB by USB_DCI_DEFAULT_ROOTHUB.
	Use static const for fops in atmegadci driver.
	Style changes in at91.

Affected files ...

.. //depot/projects/soc2009/syl_usb/src/sys/dev/usb/controller/at91dci.c#14 edit
.. //depot/projects/soc2009/syl_usb/src/sys/dev/usb/controller/atmegadci.c#12 edit
.. //depot/projects/soc2009/syl_usb/src/sys/dev/usb/controller/avr32dci.c#11 edit
.. //depot/projects/soc2009/syl_usb/src/sys/dev/usb/controller/musb_otg.c#13 edit
.. //depot/projects/soc2009/syl_usb/src/sys/dev/usb/controller/s3c24xxdci.c#20 edit
.. //depot/projects/soc2009/syl_usb/src/sys/dev/usb/controller/uss820dci.c#12 edit
.. //depot/projects/soc2009/syl_usb/src/sys/dev/usb/usb_controller.h#12 edit

Differences ...

==== //depot/projects/soc2009/syl_usb/src/sys/dev/usb/controller/at91dci.c#14 (text+ko) ====

@@ -1641,13 +1641,13 @@
 {
 	struct at91dci_softc *sc = AT9100_DCI_BUS2SC(udev->bus);
 	static const struct usb_roothub_fops fops = {
-		DEFAULT_ROOTHUB,
-		.handle_get_port_status = &at91dci_get_port_status,
-		.handle_clocks_on = (usb_clocks_fops_t)&at91dci_clocks_on,
-		.handle_clocks_off = (usb_clocks_fops_t)&at91dci_clocks_off,
-		.handle_pull_up = (usb_clocks_fops_t)&at91dci_pull_up,
-		.handle_pull_down = (usb_clocks_fops_t)&at91dci_pull_down,
-		.handle_wakeup_peer = (usb_clocks_fops_t)&at91dci_wakeup_peer,
+	    USB_DCI_DEFAULT_ROOTHUB,
+	    .handle_get_port_status = &at91dci_get_port_status,
+	    .handle_clocks_on = (usb_clocks_fops_t)&at91dci_clocks_on,
+	    .handle_clocks_off = (usb_clocks_fops_t)&at91dci_clocks_off,
+	    .handle_pull_up = (usb_clocks_fops_t)&at91dci_pull_up,
+	    .handle_pull_down = (usb_clocks_fops_t)&at91dci_pull_down,
+	    .handle_wakeup_peer = (usb_clocks_fops_t)&at91dci_wakeup_peer,
 	};
 
 	return generic_roothub_exec((struct usb_generic_softc *)sc, &fops, req,

==== //depot/projects/soc2009/syl_usb/src/sys/dev/usb/controller/atmegadci.c#12 (text+ko) ====

@@ -1563,15 +1563,15 @@
     struct usb_device_request *req, const void **pptr, uint16_t *plength)
 {	
 	struct atmegadci_softc *sc = ATMEGA_BUS2SC(udev->bus);
-	struct usb_roothub_fops fops;
-
-	bzero(&fops, sizeof(fops));
-	fops.handle_clear_port_feature = &atmega_clear_port_feature;
-	fops.handle_clocks_on = (usb_clocks_fops_t)&atmegadci_clocks_on;
-	fops.handle_clocks_off = (usb_clocks_fops_t)&atmegadci_clocks_off;
-	fops.handle_pull_up = (usb_clocks_fops_t)&atmegadci_pull_up;
-	fops.handle_pull_down = (usb_clocks_fops_t)&atmegadci_pull_down;
-	fops.handle_wakeup_peer = (usb_clocks_fops_t)&atmegadci_wakeup_peer;
+	static const struct usb_roothub_fops fops = {
+	    USB_DCI_DEFAULT_ROOTHUB,
+	    .handle_clear_port_feature = &atmega_clear_port_feature,
+	    .handle_clocks_on = (usb_clocks_fops_t)&atmegadci_clocks_on,
+	    .handle_clocks_off = (usb_clocks_fops_t)&atmegadci_clocks_off,
+	    .handle_pull_up = (usb_clocks_fops_t)&atmegadci_pull_up,
+	    .handle_pull_down = (usb_clocks_fops_t)&atmegadci_pull_down,
+	    .handle_wakeup_peer = (usb_clocks_fops_t)&atmegadci_wakeup_peer,
+	};
 	return generic_roothub_exec((struct usb_generic_softc *) sc, &fops, req,
 	    pptr, plength);
 }

==== //depot/projects/soc2009/syl_usb/src/sys/dev/usb/controller/avr32dci.c#11 (text+ko) ====

@@ -1549,7 +1549,7 @@
 {
 	struct avr32dci_softc *sc = AVR32_BUS2SC(udev->bus);
 	static const struct usb_roothub_fops fops = {
-	    DEFAULT_ROOTHUB,
+	    USB_DCI_DEFAULT_ROOTHUB,
 	    .handle_clear_port_feature = &avr32dci_clear_port_feature,
 	    .handle_get_port_status = &avr32dci_get_port_status,
 	    .handle_clocks_on = (usb_clocks_fops_t)&avr32dci_clocks_on,

==== //depot/projects/soc2009/syl_usb/src/sys/dev/usb/controller/musb_otg.c#13 (text+ko) ====

@@ -2053,7 +2053,7 @@
 {
 	struct musbotg_softc *sc = MUSBOTG_BUS2SC(udev->bus);
 	static const struct usb_roothub_fops fops = {
-	    DEFAULT_ROOTHUB,
+	    UBS_DCI_DEFAULT_ROOTHUB,
 	    .handle_get_port_status = &musbotg_get_port_status,
 	    .handle_clocks_on = (usb_clocks_fops_t)&musbotg_clocks_on,
 	    .handle_clocks_off = (usb_clocks_fops_t)&musbotg_clocks_off,

==== //depot/projects/soc2009/syl_usb/src/sys/dev/usb/controller/s3c24xxdci.c#20 (text+ko) ====

@@ -859,7 +859,7 @@
 {
 	struct s3c24dci_softc *sc = S3C24_DCI_BUS2SC(udev->bus);
 	static const struct usb_roothub_fops fops = {
-	    DEFAULT_ROOTHUB,
+	    USB_DCI_DEFAULT_ROOTHUB,
 	    .handle_clocks_on = (usb_clocks_fops_t)&s3c24dci_clocks_on,
 	    .handle_clocks_off = (usb_clocks_fops_t)&s3c24dci_clocks_off,
 	    .handle_pull_up = (usb_clocks_fops_t)&s3c24dci_pull_up,

==== //depot/projects/soc2009/syl_usb/src/sys/dev/usb/controller/uss820dci.c#12 (text+ko) ====

@@ -1629,7 +1629,7 @@
 {
 	struct uss820dci_softc *sc = USS820_DCI_BUS2SC(udev->bus);
 	static const struct usb_roothub_fops fops = {
-	    DEFAULT_ROOTHUB,
+	    USB_DCI_DEFAULT_ROOTHUB,
 	    .handle_pull_up = (usb_clocks_fops_t)&uss820dci_pull_up,
 	    .handle_pull_down = (usb_clocks_fops_t)&uss820dci_pull_down,
 	    .handle_wakeup_peer = (usb_clocks_fops_t)&uss820dci_wakeup_peer,

==== //depot/projects/soc2009/syl_usb/src/sys/dev/usb/usb_controller.h#12 (text+ko) ====

@@ -272,7 +272,7 @@
 usb_error_t generic_get_class_descriptor(struct usb_generic_softc *sc, const struct usb_roothub_fops *fops, uint16_t *len, uint16_t *value, uint16_t *index);
 usb_error_t generic_get_class_status(struct usb_generic_softc *sc, const struct usb_roothub_fops *fops, uint16_t *len, uint16_t *value, uint16_t *index);
 
-#define DEFAULT_ROOTHUB					\
+#define USB_DCI_DEFAULT_ROOTHUB				\
 .handle_get_descriptor = &generic_get_descriptor,	\
 .handle_get_config = &generic_get_config,		\
 .handle_get_status = &generic_get_status,		\



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200908141911.n7EJBIcS021235>