usb: typec: fusb302: Fix debugfs issue
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>
Thu, 24 May 2018 08:18:26 +0000 (11:18 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 24 May 2018 16:17:00 +0000 (18:17 +0200)
commitc9359f41620764822842d0c25908efdc019833f3
treef2b68b843731fd27603be2737e3152388c7b7b27
parent7c8d44566d725783f60b92010e41c8e5b75a590c
usb: typec: fusb302: Fix debugfs issue

Removing the "fusb302" debugfs directory when unloading
the driver. That allows the driver to be loaded more then
one time. The directory will not get actually removed until
it is empty, so only after the last instance has been
removed.

This fixes an issue where the driver can't be re-loaded if
it has been unloaded as the "fusb302" debugfs directory
already exists.

Fixes: 76f0c53d08b9 ("usb: typec: fusb302: Move out of staging")
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/fusb302/fusb302.c