soc: imx: gpcv2: removing and probing fails

Lucas Stach l.stach at pengutronix.de
Tue Jan 9 06:24:46 PST 2018


Am Sonntag, den 07.01.2018, 11:48 +0100 schrieb Stefan Agner:
> Hi Andrew,
> 
> I noticed that the driver fails when removing and probing again. As far
> as I can see due to duplicate add of the platform devices.
> 
> As far as I can tell the driver should register the remove callback and
> do a platform_device_unregister on the newly created platform devices.
> However, as far as I can tell we don't hold on to a reference to them...
> I guess we could keep references in imx_gpcv2_probe, but maybe there is
> an easier way?

The GPC v1 driver adds the necessary device dependency between the
power domain devices and the GPC parent device. See the
device_link_add() in imx_pgc_power_domain_probe().

Probably something similar can be done to the GPC v2 driver.

Regards,
Lucas



More information about the linux-arm-kernel mailing list