usb: gadget: configfs: change config attributes file operation
authorLinyu Yuan <quic_linyyuan@quicinc.com>
Tue, 19 Oct 2021 13:26:35 +0000 (21:26 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 22 Oct 2021 09:18:26 +0000 (11:18 +0200)
commitc26f1c109d21f2ea874e4a85c0c76c385b8f46cb
treef4e3c2b1ea4cc412cd373db5f1a72ebb9aaf7292
parent260d88b79c9f9c9d9cda10aad9c9b8486ddcf56a
usb: gadget: configfs: change config attributes file operation

in order to add trace event in configfs function with same
struct gadget_info *gi parameter,
add struct config_usb_cfg *cfg variable in below functions,
gadget_config_desc_MaxPower_show(),
gadget_config_desc_MaxPower_store(),
gadget_config_desc_bmAttributes_show(),
gadget_config_desc_bmAttributes_store(),
this allow following patch easy change cfg to gi with helper function
cfg_to_gadget_info().

Signed-off-by: Linyu Yuan <quic_linyyuan@quicinc.com>
Link: https://lore.kernel.org/r/1634649997-28745-3-git-send-email-quic_linyyuan@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/configfs.c