mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 16:44:58 +02:00
xhci: dbc: Use sizeof_field() where it makes sense
Instead of doing custom calculations, use sizeof_field() macro. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://lore.kernel.org/r/20231201150647.1307406-9-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
b28718717b
commit
84637512e0
|
|
@ -374,7 +374,7 @@ static void xhci_dbc_eps_init(struct xhci_dbc *dbc)
|
|||
|
||||
static void xhci_dbc_eps_exit(struct xhci_dbc *dbc)
|
||||
{
|
||||
memset(dbc->eps, 0, sizeof(struct dbc_ep) * ARRAY_SIZE(dbc->eps));
|
||||
memset(dbc->eps, 0, sizeof_field(struct xhci_dbc, eps));
|
||||
}
|
||||
|
||||
static int dbc_erst_alloc(struct device *dev, struct xhci_ring *evt_ring,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user