diff options
author | Don Zickus <dzickus@redhat.com> | 2015-06-04 09:22:48 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-06-08 13:36:44 -0700 |
commit | 04dacacc14b4d60d58725c14f066a052cee6ff02 (patch) | |
tree | d74841a68fd8ddf9f9dac78c2ec019b629732695 /drivers/staging/unisys | |
parent | 75439a17d4e82f630a86b4ca07a6d38ca6fbaa21 (diff) | |
download | blackbird-op-linux-04dacacc14b4d60d58725c14f066a052cee6ff02.tar.gz blackbird-op-linux-04dacacc14b4d60d58725c14f066a052cee6ff02.zip |
staging: unisys: Fix clean up path
When unloading a module, we need to cleanup the platform registration.
However, unregistering the platform uncovered a couple of quirks, namely
a missing device_release function. Fix things up so module unload works
and allows us to reload the module.
Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys')
-rw-r--r-- | drivers/staging/unisys/visorbus/visorbus_main.c | 2 | ||||
-rw-r--r-- | drivers/staging/unisys/visorbus/visorchipset.c | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c index 22c6150f543e..dcce1f02d54d 100644 --- a/drivers/staging/unisys/visorbus/visorbus_main.c +++ b/drivers/staging/unisys/visorbus/visorbus_main.c @@ -320,7 +320,7 @@ devmajorminor_remove_file(struct visor_device *dev, int slot) if (slot < 0 || slot >= maxdevnodes) return; myattr = (struct devmajorminor_attribute *)(dev->devnodes[slot].attr); - if (myattr) + if (!myattr) return; sysfs_remove_file(&dev->kobjdevmajorminor, &myattr->attr); kobject_uevent(&dev->device.kobj, KOBJ_OFFLINE); diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c index 90a3c30c9701..99fa96e80e1e 100644 --- a/drivers/staging/unisys/visorbus/visorchipset.c +++ b/drivers/staging/unisys/visorbus/visorchipset.c @@ -331,11 +331,16 @@ static const struct attribute_group *visorchipset_dev_groups[] = { NULL }; +static void visorchipset_dev_release(struct device *dev) +{ +} + /* /sys/devices/platform/visorchipset */ static struct platform_device visorchipset_platform_device = { .name = "visorchipset", .id = -1, .dev.groups = visorchipset_dev_groups, + .dev.release = visorchipset_dev_release, }; /* Function prototypes */ @@ -2355,6 +2360,7 @@ visorchipset_exit(struct acpi_device *acpi_device) visorchannel_destroy(controlvm_channel); visorchipset_file_cleanup(visorchipset_platform_device.dev.devt); + platform_device_unregister(&visorchipset_platform_device); POSTCODE_LINUX_2(DRIVER_EXIT_PC, POSTCODE_SEVERITY_INFO); return 0; |