[v2] usb: pci-quirks: Reduce the length of a spinlock section in usb_amd_find_chipset_info()
Commit Message
'info' is local to the function. There is no need to zeroing it within
a spin_lock section. Moreover, there is no need to explicitly initialize
the .need_pll_quirk field.
Initialize the structure when defined and remove the now useless memset().
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/usb/host/pci-quirks.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
@@ -207,8 +207,7 @@ EXPORT_SYMBOL_GPL(sb800_prefetch);
static void usb_amd_find_chipset_info(void)
{
unsigned long flags;
- struct amd_chipset_info info;
- info.need_pll_quirk = false;
+ struct amd_chipset_info info = { };
spin_lock_irqsave(&amd_lock, flags);
@@ -218,7 +217,6 @@ static void usb_amd_find_chipset_info(void)
spin_unlock_irqrestore(&amd_lock, flags);
return;
}
- memset(&info, 0, sizeof(info));
spin_unlock_irqrestore(&amd_lock, flags);
if (!amd_chipset_sb_type_init(&info)) {