From: Johan Hovold Date: Thu, 3 Mar 2016 12:34:40 +0000 (+0100) Subject: greybus: hd: rename CPort-features callbacks X-Git-Tag: v4.9-rc1~119^2~378^2~21^2~609 X-Git-Url: http://git.cascardo.eti.br/?a=commitdiff_plain;h=aa2a5459aa167814f847afb05c262c1f29dc9c6a;p=cascardo%2Flinux.git greybus: hd: rename CPort-features callbacks 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c index 96a8aa3285ff..64fa20a06da0 100644 --- a/drivers/staging/greybus/connection.c +++ b/drivers/staging/greybus/connection.c @@ -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; diff --git a/drivers/staging/greybus/es2.c b/drivers/staging/greybus/es2.c index e920563351ff..239adf7a3749 100644 --- a/drivers/staging/greybus/es2.c +++ b/drivers/staging/greybus/es2.c @@ -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 */ diff --git a/drivers/staging/greybus/greybus_protocols.h b/drivers/staging/greybus/greybus_protocols.h index 8fd91f1b10a1..27acbdd39571 100644 --- a/drivers/staging/greybus/greybus_protocols.h +++ b/drivers/staging/greybus/greybus_protocols.h @@ -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 */ diff --git a/drivers/staging/greybus/hd.h b/drivers/staging/greybus/hd.h index eaddfc9befd6..fe6c086a8e3d 100644 --- a/drivers/staging/greybus/hd.h +++ b/drivers/staging/greybus/hd.h @@ -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 {