USB: gadget: lpc32xx_udc: remove debugfs dentry variable
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 May 2021 16:20:35 +0000 (18:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 May 2021 11:44:40 +0000 (13:44 +0200)
commite3d59eff47b8cc385acae9d7fb1c787857023376
tree86f0ac02feab53be9ade2cc6b619f79256227162
parent92c6dc0beb684e3421b61313c5e572cd9c93eab4
USB: gadget: lpc32xx_udc: remove debugfs dentry variable

There is no need to store the dentry for a fixed filename that we have
the string for.  So just have debugfs look it up when we need it to
remove the file, no need to store it anywhere locally.

Note, this driver is broken in that debugfs will not work for more than
one instance of the device it supports.  But given that this patch does
not change that, and no one has ever seemed to notice, it must not be an
issue...

Cc: Felipe Balbi <balbi@kernel.org>
Cc: Vladimir Zapolskiy <vz@mleia.com>
Cc: linux-usb@vger.kernel.org
Acked-by: Vladimir Zapolskiy <vz@mleia.com>
Acked-by: Felipe Balbi <balbi@kernel.org>
Link: https://lore.kernel.org/r/20210518162035.3697860-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/udc/lpc32xx_udc.c