Module: xenomai-3
Branch: stable-3.0.x
Commit: cc6f7533e468f874834bb0e78b3b0765b33cd706
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=cc6f7533e468f874834bb0e78b3b0765b33cd706

Author: Philippe Gerum <r...@xenomai.org>
Date:   Tue Nov 29 12:21:32 2016 +0100

drivers/spi: master: clear device class upon removal

Since the master driver structure may be registered back later, we
want to make sure that no dandling class pointer is left there.

---

 kernel/drivers/spi/spi-master.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/drivers/spi/spi-master.c b/kernel/drivers/spi/spi-master.c
index ac7929a..12a1ad1 100644
--- a/kernel/drivers/spi/spi-master.c
+++ b/kernel/drivers/spi/spi-master.c
@@ -426,6 +426,7 @@ void rtdm_spi_remove_master(struct rtdm_spi_master *master)
        
        rtdm_mutex_destroy(&master->bus_lock);
        spi_unregister_master(master->kmaster);
+       rtdm_drv_set_sysclass(&master->driver, NULL);
        class_destroy(class);
        kfree(classname);
 }


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
https://xenomai.org/mailman/listinfo/xenomai-git

Reply via email to