greybus: es2: fix USB vendor-request prefixes
authorJohan Hovold <johan@hovoldconsulting.com>
Wed, 10 Aug 2016 10:58:40 +0000 (12:58 +0200)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 10 Aug 2016 13:36:34 +0000 (15:36 +0200)
Make sure to use the common GB_APB prefix for all APBA USB vendor
requests.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/es2.c
drivers/staging/greybus/greybus_protocols.h

index 3b8d81e..996cfc6 100644 (file)
@@ -833,7 +833,7 @@ static int timesync_enable(struct gb_host_device *hd, u8 count,
        request->strobe_delay = cpu_to_le32(strobe_delay);
        request->refclk = cpu_to_le32(refclk);
        retval = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
-                                REQUEST_TIMESYNC_ENABLE,
+                                GB_APB_REQUEST_TIMESYNC_ENABLE,
                                 USB_DIR_OUT | USB_TYPE_VENDOR |
                                 USB_RECIP_INTERFACE, 0, 0, request,
                                 sizeof(*request), ES2_USB_CTRL_TIMEOUT);
@@ -851,7 +851,7 @@ static int timesync_disable(struct gb_host_device *hd)
        struct usb_device *udev = es2->usb_dev;
 
        retval = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
-                                REQUEST_TIMESYNC_DISABLE,
+                                GB_APB_REQUEST_TIMESYNC_DISABLE,
                                 USB_DIR_OUT | USB_TYPE_VENDOR |
                                 USB_RECIP_INTERFACE, 0, 0, NULL,
                                 0, ES2_USB_CTRL_TIMEOUT);
@@ -876,7 +876,7 @@ static int timesync_authoritative(struct gb_host_device *hd, u64 *frame_time)
                request->frame_time[i] = cpu_to_le64(frame_time[i]);
 
        retval = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
-                                REQUEST_TIMESYNC_AUTHORITATIVE,
+                                GB_APB_REQUEST_TIMESYNC_AUTHORITATIVE,
                                 USB_DIR_OUT | USB_TYPE_VENDOR |
                                 USB_RECIP_INTERFACE, 0, 0, request,
                                 sizeof(*request), ES2_USB_CTRL_TIMEOUT);
@@ -899,7 +899,7 @@ static int timesync_get_last_event(struct gb_host_device *hd, u64 *frame_time)
                return -ENOMEM;
 
        retval = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
-                                REQUEST_TIMESYNC_GET_LAST_EVENT,
+                                GB_APB_REQUEST_TIMESYNC_GET_LAST_EVENT,
                                 USB_DIR_IN | USB_TYPE_VENDOR |
                                 USB_RECIP_INTERFACE, 0, 0, response_frame_time,
                                 sizeof(*response_frame_time),
@@ -1165,7 +1165,7 @@ static int arpc_send(struct es2_ap_dev *es2, struct arpc *rpc, int timeout)
        int retval;
 
        retval = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
-                                APBA_REQUEST_ARPC_RUN,
+                                GB_APB_REQUEST_ARPC_RUN,
                                 USB_DIR_OUT | USB_TYPE_VENDOR |
                                 USB_RECIP_INTERFACE,
                                 0, 0,
index 63fd48d..4bf494c 100644 (file)
@@ -250,17 +250,17 @@ struct gb_control_intf_pm_response {
 #define GB_APB_REQUEST_CPORT_FEAT_EN           0x0b
 #define GB_APB_REQUEST_CPORT_FEAT_DIS          0x0c
 
-/* TimeSync commands */
-#define REQUEST_TIMESYNC_ENABLE                        0x0d
-#define REQUEST_TIMESYNC_DISABLE               0x0e
-#define REQUEST_TIMESYNC_AUTHORITATIVE         0x0f
-#define REQUEST_TIMESYNC_GET_LAST_EVENT                0x10
+/* TimeSync requests */
+#define GB_APB_REQUEST_TIMESYNC_ENABLE         0x0d
+#define GB_APB_REQUEST_TIMESYNC_DISABLE                0x0e
+#define GB_APB_REQUEST_TIMESYNC_AUTHORITATIVE  0x0f
+#define GB_APB_REQUEST_TIMESYNC_GET_LAST_EVENT 0x10
 
 /* requests to set Greybus CPort flags */
 #define GB_APB_REQUEST_CPORT_FLAGS             0x11
 
-/* ARPC command */
-#define APBA_REQUEST_ARPC_RUN                  0x12
+/* ARPC request */
+#define GB_APB_REQUEST_ARPC_RUN                        0x12
 
 struct gb_apb_request_cport_flags {
        __le32  flags;