Re: [PATCH can 2/4] can: flexcan: flexcan_probe(): fix probing for m68k/coldfire and reject devices without match data

From: Marc Kleine-Budde

Date: Mon Nov 16 2026 - 04:32:33 EST


On 16.11.2026 10:14:17, Uwe Kleine-König wrote:
> > devtype_data = device_get_match_data(&pdev->dev);
> > + if (!devtype_data && platform_get_device_id(pdev))
> > + devtype_data = (struct flexcan_devtype_data *)
> > + platform_get_device_id(pdev)->driver_data;
> > + if (!devtype_data)
> > + return -ENODEV;
>
> My stance is that the ability to bind an "unexpected" device via
> driver_override is something that should be handled in the core, see
> https://lore.kernel.org/all/0f7446324f6a0c8f0153d6532d92a6eeecd6a308.1790612298.git.u.kleine-koenig@xxxxxxxxxxxx/
> for the latest patch to address this.

Thanks, Biju Das already pointed out that series.

> I'll work on this patch to hopefully get it into v7.5-rc1.

Thanks!

> IMHO it's ok to not fix this in a driver specific way now. (And then
> my patch referenced above in the first Closes:-trailer is IMHO better
> than this patch.)

I'll drop the other patches, that only fix the driver_override case.

regards,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung Nürnberg | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |

Attachment: signature.asc
Description: PGP signature