Re: [PATCH v6 14/14] usb/gadget: f_mass_storage: add configfs support

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

 



W dniu 14.10.2013 22:39, Michal Nazarewicz pisze:

I generally agree, but please see inline. I will post the corrected patch as a reply to this thread.

On Wed, Oct 09 2013, Andrzej Pietrasiewicz <andrzej.p@xxxxxxxxxxx> wrote:
 From this commit on f_mass_storage is available through configfs.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@xxxxxxxxxxx>
Signed-off-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx>

Acked-by: Michal Nazarewicz <mina86@xxxxxxxxxx>

Just tiny nit-picking to follow:

diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c
index d80be5f..00d3687 100644
--- a/drivers/usb/gadget/f_mass_storage.c
+++ b/drivers/usb/gadget/f_mass_storage.c

@@ -3295,6 +3296,342 @@ static int fsg_bind_config(struct usb_composite_dev *cdev,

  #else

+static inline struct fsg_lun_opts *to_fsg_lun_opts(struct config_item *item)
+{
+	return container_of(to_config_group(item), struct fsg_lun_opts, group);
+}
+
+static inline struct fsg_opts *to_fsg_opts(struct config_item *item)
+{
+	return container_of(to_config_group(item), struct fsg_opts,
+			    func_inst.group);
+}

Personally I'd prefer “fsg_lun_opts_from_config_item” and
“fsg_opts_from_config_item”, but whatever.


I wouldn't mind changing it according to your taste, but the
CONFIGFS_ATTR_OPS macro (defined in include/linux/configfs.h) expects
that there is a to_##item() function available, where the "item" is
CONFIGFS_ATTR_OPS's argument.

AP
--
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