diff options
author | Fabio Estevam | 2016-09-08 09:34:32 -0300 |
---|---|---|
committer | Peter Chen | 2016-09-14 10:58:13 +0800 |
commit | e74e83724808b72173b557bd8008202109fb6091 (patch) | |
tree | be3bc745e64cc4ea95388391b2a6da61fe4b043c /drivers/usb/chipidea/udc.c | |
parent | 58001effe172f300d558dffbd723c8521b9404f2 (diff) |
usb: chipidea: udc: Use the preferred form for passing a size of a struct
According to Documentation/CodingStyle:
"The preferred form for passing a size of a struct is the following:
p = kmalloc(sizeof(*p), ...);
"
, so do as suggested to improve readability.
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Diffstat (limited to 'drivers/usb/chipidea/udc.c')
-rw-r--r-- | drivers/usb/chipidea/udc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 22534a1622d9..661f43fe0f9e 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c @@ -1993,7 +1993,7 @@ int ci_hdrc_gadget_init(struct ci_hdrc *ci) if (!hw_read(ci, CAP_DCCPARAMS, DCCPARAMS_DC)) return -ENXIO; - rdrv = devm_kzalloc(ci->dev, sizeof(struct ci_role_driver), GFP_KERNEL); + rdrv = devm_kzalloc(ci->dev, sizeof(*rdrv), GFP_KERNEL); if (!rdrv) return -ENOMEM; |