greybus: hd: rename CPort-features callbacks
authorJohan Hovold <johan@hovoldconsulting.com>
Thu, 3 Mar 2016 12:34:40 +0000 (13:34 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Sat, 5 Mar 2016 02:26:08 +0000 (18:26 -0800)
Rename the CPort-features callbacks, that are not just used to enable
FCT flow, to the more descriptive cport_features_enable/disable.

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

index 96a8aa3285ff955e64e2d7fde8308a608589454a..64fa20a06da02f57c28636f2d4b2320facdd2c95 100644 (file)
@@ -290,17 +290,18 @@ static void gb_connection_hd_cport_disable(struct gb_connection *connection)
        hd->driver->cport_disable(hd, connection->hd_cport_id);
 }
 
-static int gb_connection_hd_fct_flow_enable(struct gb_connection *connection)
+static int
+gb_connection_hd_cport_features_enable(struct gb_connection *connection)
 {
        struct gb_host_device *hd = connection->hd;
        int ret;
 
-       if (!hd->driver->fct_flow_enable)
+       if (!hd->driver->cport_features_enable)
                return 0;
 
-       ret = hd->driver->fct_flow_enable(hd, connection->hd_cport_id);
+       ret = hd->driver->cport_features_enable(hd, connection->hd_cport_id);
        if (ret) {
-               dev_err(&hd->dev, "%s: failed to enable FCT flow: %d\n",
+               dev_err(&hd->dev, "%s: failed to enable CPort features: %d\n",
                        connection->name, ret);
                return ret;
        }
@@ -308,14 +309,15 @@ static int gb_connection_hd_fct_flow_enable(struct gb_connection *connection)
        return 0;
 }
 
-static void gb_connection_hd_fct_flow_disable(struct gb_connection *connection)
+static void
+gb_connection_hd_cport_features_disable(struct gb_connection *connection)
 {
        struct gb_host_device *hd = connection->hd;
 
-       if (!hd->driver->fct_flow_disable)
+       if (!hd->driver->cport_features_disable)
                return;
 
-       hd->driver->fct_flow_disable(hd, connection->hd_cport_id);
+       hd->driver->cport_features_disable(hd, connection->hd_cport_id);
 }
 
 /*
@@ -331,7 +333,7 @@ gb_connection_svc_connection_create(struct gb_connection *connection)
        int ret;
 
        if (gb_connection_is_static(connection))
-               return gb_connection_hd_fct_flow_enable(connection);
+               return gb_connection_hd_cport_features_enable(connection);
 
        intf = connection->intf;
 
@@ -357,7 +359,7 @@ gb_connection_svc_connection_create(struct gb_connection *connection)
                return ret;
        }
 
-       ret = gb_connection_hd_fct_flow_enable(connection);
+       ret = gb_connection_hd_cport_features_enable(connection);
        if (ret) {
                gb_svc_connection_destroy(hd->svc, hd->svc->ap_intf_id,
                                          connection->hd_cport_id,
@@ -372,7 +374,7 @@ gb_connection_svc_connection_create(struct gb_connection *connection)
 static void
 gb_connection_svc_connection_destroy(struct gb_connection *connection)
 {
-       gb_connection_hd_fct_flow_disable(connection);
+       gb_connection_hd_cport_features_disable(connection);
 
        if (gb_connection_is_static(connection))
                return;
index e920563351ff4cf9c4d830cd2a1a065d741c8aa1..239adf7a3749676eecbcd1be883e17fa821b68df 100644 (file)
@@ -574,37 +574,37 @@ static int latency_tag_disable(struct gb_host_device *hd, u16 cport_id)
        return retval;
 }
 
-static int fct_flow_enable(struct gb_host_device *hd, u16 cport_id)
+static int cport_features_enable(struct gb_host_device *hd, u16 cport_id)
 {
        int retval;
        struct es2_ap_dev *es2 = hd_to_es2(hd);
        struct usb_device *udev = es2->usb_dev;
 
        retval = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
-                                GB_APB_REQUEST_FCT_FLOW_EN,
+                                GB_APB_REQUEST_CPORT_FEAT_EN,
                                 USB_DIR_OUT | USB_TYPE_VENDOR |
                                 USB_RECIP_INTERFACE, cport_id, 0, NULL,
                                 0, ES2_TIMEOUT);
        if (retval < 0)
-               dev_err(&udev->dev, "Cannot enable FCT flow for cport %u: %d\n",
+               dev_err(&udev->dev, "Cannot enable CPort features for cport %u: %d\n",
                        cport_id, retval);
        return retval;
 }
 
-static int fct_flow_disable(struct gb_host_device *hd, u16 cport_id)
+static int cport_features_disable(struct gb_host_device *hd, u16 cport_id)
 {
        int retval;
        struct es2_ap_dev *es2 = hd_to_es2(hd);
        struct usb_device *udev = es2->usb_dev;
 
        retval = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
-                                GB_APB_REQUEST_FCT_FLOW_DIS,
+                                GB_APB_REQUEST_CPORT_FEAT_DIS,
                                 USB_DIR_OUT | USB_TYPE_VENDOR |
                                 USB_RECIP_INTERFACE, cport_id, 0, NULL,
                                 0, ES2_TIMEOUT);
        if (retval < 0)
                dev_err(&udev->dev,
-                       "Cannot disable FCT flow for cport %u: %d\n",
+                       "Cannot disable CPort features for cport %u: %d\n",
                        cport_id, retval);
        return retval;
 }
@@ -617,8 +617,8 @@ static struct gb_hd_driver es2_driver = {
        .latency_tag_enable     = latency_tag_enable,
        .latency_tag_disable    = latency_tag_disable,
        .output                 = output,
-       .fct_flow_enable        = fct_flow_enable,
-       .fct_flow_disable       = fct_flow_disable,
+       .cport_features_enable  = cport_features_enable,
+       .cport_features_disable = cport_features_disable,
 };
 
 /* Common function to report consistent warnings based on URB status */
index 8fd91f1b10a1b648d844596b8ffc1bd7a79c331f..27acbdd39571514554c1bc0c82f25a4d81829053 100644 (file)
@@ -212,9 +212,9 @@ struct gb_control_timesync_authoritative_request {
 /* request to control the CSI transmitter */
 #define GB_APB_REQUEST_AUDIO_CONTROL   0x09
 
-/* vendor requests to enable/disable FCT tokens flow */
-#define GB_APB_REQUEST_FCT_FLOW_EN     0x0b
-#define GB_APB_REQUEST_FCT_FLOW_DIS    0x0c
+/* vendor requests to enable/disable CPort features */
+#define GB_APB_REQUEST_CPORT_FEAT_EN   0x0b
+#define GB_APB_REQUEST_CPORT_FEAT_DIS  0x0c
 
 /* Firmware Protocol */
 
index eaddfc9befd645d63e9b322d9704acaf200ec7e3..fe6c086a8e3dd18d5b714013dab5a8c5221ee22f 100644 (file)
@@ -25,8 +25,8 @@ struct gb_hd_driver {
        int (*latency_tag_disable)(struct gb_host_device *hd, u16 cport_id);
        int (*output)(struct gb_host_device *hd, void *req, u16 size, u8 cmd,
                      bool async);
-       int (*fct_flow_enable)(struct gb_host_device *hd, u16 cport_id);
-       int (*fct_flow_disable)(struct gb_host_device *hd, u16 cport_id);
+       int (*cport_features_enable)(struct gb_host_device *hd, u16 cport_id);
+       int (*cport_features_disable)(struct gb_host_device *hd, u16 cport_id);
 };
 
 struct gb_host_device {