]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
greybus: svc: Fix endian of hotplug request data
authorPhong Tran <tranmanphong@gmail.com>
Wed, 27 May 2015 14:31:02 +0000 (21:31 +0700)
committerGreg Kroah-Hartman <gregkh@google.com>
Thu, 28 May 2015 20:58:29 +0000 (13:58 -0700)
data of hotplug request should exchange to native
CPU format before assignment.

Signed-off-by: Phong Tran <tranmanphong@gmail.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/svc.c

index e39eddbbcb9eb429f5ed7e39f85ff8aa91ff6986..ffbeac57769d5522cb2d6754183a09aa4deaa64b 100644 (file)
@@ -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 */