From: Phong Tran Date: Wed, 27 May 2015 14:31:02 +0000 (+0700) Subject: greybus: svc: Fix endian of hotplug request data X-Git-Tag: Ubuntu-4.9.0-1.2~749^2~378^2~21^2~1520 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=ea15a40b32dcc068a2af406ba894e2179c315469;p=mirror_ubuntu-zesty-kernel.git greybus: svc: Fix endian of hotplug request data data of hotplug request should exchange to native CPU format before assignment. Signed-off-by: Phong Tran Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/svc.c b/drivers/staging/greybus/svc.c index e39eddbbcb9e..ffbeac57769d 100644 --- a/drivers/staging/greybus/svc.c +++ b/drivers/staging/greybus/svc.c @@ -131,10 +131,10 @@ static int gb_svc_intf_hotplug_recv(struct gb_operation *op) * XXX have the SVC get acknowledgement before we proceed. * */ intf_id = hotplug->intf_id; - unipro_mfg_id = hotplug->data.unipro_mfg_id; - unipro_prod_id = hotplug->data.unipro_prod_id; - ara_vend_id = hotplug->data.ara_vend_id; - ara_prod_id = hotplug->data.ara_prod_id; + unipro_mfg_id = le32_to_cpu(hotplug->data.unipro_mfg_id); + unipro_prod_id = le32_to_cpu(hotplug->data.unipro_prod_id); + ara_vend_id = le32_to_cpu(hotplug->data.ara_vend_id); + ara_prod_id = le32_to_cpu(hotplug->data.ara_prod_id); /* FIXME Set up the interface here; may required firmware download */