Преглед на файлове

HSI: omap_ssi: fix removal of port platform device

This avoids removal of the HSI port device when
only the platform port device should be removed
and clears the POPULATED bit in the DT node, so
that a new platform device is created when the
driver is probed again.

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Sebastian Reichel преди 9 години
родител
ревизия
2a57aba850
променени са 1 файла, в които са добавени 4 реда и са изтрити 0 реда
  1. 4 0
      drivers/hsi/controllers/omap_ssi.c

+ 4 - 0
drivers/hsi/controllers/omap_ssi.c

@@ -451,6 +451,10 @@ static int ssi_remove_ports(struct device *dev, void *c)
 {
 {
 	struct platform_device *pdev = to_platform_device(dev);
 	struct platform_device *pdev = to_platform_device(dev);
 
 
+	if (!dev->of_node)
+		return 0;
+
+	of_node_clear_flag(dev->of_node, OF_POPULATED);
 	of_device_unregister(pdev);
 	of_device_unregister(pdev);
 
 
 	return 0;
 	return 0;