mirror of https://gitee.com/openkylin/linux.git
greybus: hd: rename host-driver structure
Rename host-driver structure to gb_hd_driver to more clearly separate it from the host-device structure. Also remove an outdated description of the struct. Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
2537636aba
commit
a8cc020f3f
|
@ -325,7 +325,7 @@ static int latency_tag_disable(struct gb_host_device *hd, u16 cport_id)
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct greybus_host_driver es1_driver = {
|
static struct gb_hd_driver es1_driver = {
|
||||||
.hd_priv_size = sizeof(struct es1_ap_dev),
|
.hd_priv_size = sizeof(struct es1_ap_dev),
|
||||||
.message_send = message_send,
|
.message_send = message_send,
|
||||||
.message_cancel = message_cancel,
|
.message_cancel = message_cancel,
|
||||||
|
|
|
@ -471,7 +471,7 @@ static int latency_tag_disable(struct gb_host_device *hd, u16 cport_id)
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct greybus_host_driver es2_driver = {
|
static struct gb_hd_driver es2_driver = {
|
||||||
.hd_priv_size = sizeof(struct es2_ap_dev),
|
.hd_priv_size = sizeof(struct es2_ap_dev),
|
||||||
.message_send = message_send,
|
.message_send = message_send,
|
||||||
.message_cancel = message_cancel,
|
.message_cancel = message_cancel,
|
||||||
|
|
|
@ -28,7 +28,7 @@ static void free_hd(struct kref *kref)
|
||||||
mutex_unlock(&hd_mutex);
|
mutex_unlock(&hd_mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct gb_host_device *greybus_create_hd(struct greybus_host_driver *driver,
|
struct gb_host_device *greybus_create_hd(struct gb_hd_driver *driver,
|
||||||
struct device *parent,
|
struct device *parent,
|
||||||
size_t buffer_size_max,
|
size_t buffer_size_max,
|
||||||
size_t num_cports)
|
size_t num_cports)
|
||||||
|
@ -40,7 +40,7 @@ struct gb_host_device *greybus_create_hd(struct greybus_host_driver *driver,
|
||||||
* so that we don't have to every time we make them.
|
* so that we don't have to every time we make them.
|
||||||
*/
|
*/
|
||||||
if ((!driver->message_send) || (!driver->message_cancel)) {
|
if ((!driver->message_send) || (!driver->message_cancel)) {
|
||||||
pr_err("Must implement all greybus_host_driver callbacks!\n");
|
pr_err("Must implement all gb_hd_driver callbacks!\n");
|
||||||
return ERR_PTR(-EINVAL);
|
return ERR_PTR(-EINVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,10 +13,7 @@
|
||||||
struct gb_host_device;
|
struct gb_host_device;
|
||||||
struct gb_message;
|
struct gb_message;
|
||||||
|
|
||||||
/* Greybus "Host driver" structure, needed by a host controller driver to be
|
struct gb_hd_driver {
|
||||||
* able to handle both SVC control as well as "real" greybus messages
|
|
||||||
*/
|
|
||||||
struct greybus_host_driver {
|
|
||||||
size_t hd_priv_size;
|
size_t hd_priv_size;
|
||||||
|
|
||||||
int (*cport_enable)(struct gb_host_device *hd, u16 cport_id);
|
int (*cport_enable)(struct gb_host_device *hd, u16 cport_id);
|
||||||
|
@ -31,7 +28,7 @@ struct greybus_host_driver {
|
||||||
struct gb_host_device {
|
struct gb_host_device {
|
||||||
struct kref kref;
|
struct kref kref;
|
||||||
struct device *parent;
|
struct device *parent;
|
||||||
const struct greybus_host_driver *driver;
|
const struct gb_hd_driver *driver;
|
||||||
|
|
||||||
struct list_head interfaces;
|
struct list_head interfaces;
|
||||||
struct list_head connections;
|
struct list_head connections;
|
||||||
|
@ -51,7 +48,7 @@ struct gb_host_device {
|
||||||
unsigned long hd_priv[0] __aligned(sizeof(s64));
|
unsigned long hd_priv[0] __aligned(sizeof(s64));
|
||||||
};
|
};
|
||||||
|
|
||||||
struct gb_host_device *greybus_create_hd(struct greybus_host_driver *hd,
|
struct gb_host_device *greybus_create_hd(struct gb_hd_driver *driver,
|
||||||
struct device *parent,
|
struct device *parent,
|
||||||
size_t buffer_size_max,
|
size_t buffer_size_max,
|
||||||
size_t num_cports);
|
size_t num_cports);
|
||||||
|
|
Loading…
Reference in New Issue