[PATCH v3 10/19] usb/gadget: f_mass_storage: use fsg_common_set_ops/_private_data in fsg_common_init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



fsg_common_init is a lengthy function. Now there are helper functions
which cover all parts of it. Use them.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@xxxxxxxxxxx>
Signed-off-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx>
---
 drivers/usb/gadget/f_mass_storage.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c
index 691fb51..8aa6c86 100644
--- a/drivers/usb/gadget/f_mass_storage.c
+++ b/drivers/usb/gadget/f_mass_storage.c
@@ -3019,8 +3019,9 @@ struct fsg_common *fsg_common_init(struct fsg_common *common,
 			kfree(common);
 		return ERR_PTR(rc);
 	}
-	common->ops = cfg->ops;
-	common->private_data = cfg->private_data;
+
+	fsg_common_set_ops(common, cfg->ops);
+	fsg_common_set_private_data(common, cfg->private_data);
 
 	common->gadget = gadget;
 	common->ep0 = gadget->ep0;
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux