Message ID | 20180523143758.66348-4-heikki.krogerus@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hello! On 05/23/2018 05:37 PM, Heikki Krogerus wrote: > Removing the "fusb302" debugfs directory when unloading > the driver. That allows the driver to be loaded more then > ones. The directory will not get actually removed until it s/ones/once/? > 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> [...] MBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/usb/typec/fusb302/fusb302.c b/drivers/usb/typec/fusb302/fusb302.c index eba6bb890b17..9c1eba9ea004 100644 --- a/drivers/usb/typec/fusb302/fusb302.c +++ b/drivers/usb/typec/fusb302/fusb302.c @@ -234,6 +234,7 @@ static int fusb302_debugfs_init(struct fusb302_chip *chip) static void fusb302_debugfs_exit(struct fusb302_chip *chip) { debugfs_remove(chip->dentry); + debugfs_remove(rootdir); } #else
Removing the "fusb302" debugfs directory when unloading the driver. That allows the driver to be loaded more then ones. 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> --- drivers/usb/typec/fusb302/fusb302.c | 1 + 1 file changed, 1 insertion(+)