[PATCH 2/5] drm/bridge: simple-bridge: Extend match support for non-DT based systems
Sui Jingfeng
sui.jingfeng at linux.dev
Tue Jan 23 12:31:19 UTC 2024
Hi,
On 2024/1/23 09:21, Laurent Pinchart wrote:
>> static int simple_bridge_probe(struct platform_device *pdev)
>> {
>> struct simple_bridge *sbridge;
>> @@ -176,7 +194,10 @@ static int simple_bridge_probe(struct platform_device *pdev)
>> return -ENOMEM;
>> platform_set_drvdata(pdev, sbridge);
>>
>> - sbridge->info = of_device_get_match_data(&pdev->dev);
>> + if (pdev->dev.of_node)
>> + sbridge->info = of_device_get_match_data(&pdev->dev);
>> + else
>> + sbridge->info = simple_bridge_get_match_data(&pdev->dev);
>>
>> /* Get the next bridge in the pipeline. */
>> remote = of_graph_get_remote_node(pdev->dev.of_node, 1, -1);
>> @@ -309,3 +330,4 @@ module_platform_driver(simple_bridge_driver);
>> MODULE_AUTHOR("Maxime Ripard<maxime.ripard at free-electrons.com>");
>> MODULE_DESCRIPTION("Simple DRM bridge driver");
>> MODULE_LICENSE("GPL");
>> +MODULE_ALIAS("platform:simple-bridge");
> This is an unrelated change.
Otherwise, this driver will not be probed when compiled as module on non-DT environment.
More information about the dri-devel
mailing list