media: venus: drop bogus probe deferrals
Subsystems (4)
PATCH 1/1 media: venus: drop bogus probe deferrals
The encoder and decoder platform devices are registered by the venus driver as children of the venus device, but even if someone were to mess this up no amount of probe deferring is going to conjure up a parent.
Relatedly, the venus driver sets its driver data before registering the child devices and if this ever breaks we want to learn about it by failing probe.
--- drivers/media/platform/qcom/venus/vdec.c | 5 +---- drivers/media/platform/qcom/venus/venc.c | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-)
drivers/media/platform/qcom/venus/vdec.c +1 -4
@@ -1778,12 +1778,9 @@ static int vdec_probe(struct platform_device *pdev)struct venus_core *core;int ret; -if (!dev->parent) -return -EPROBE_DEFER ; - core =dev_get_drvdata (dev->parent);if (!core) -return -EPROBE_DEFER ; +return -EINVAL ;platform_set_drvdata (pdev, core);
drivers/media/platform/qcom/venus/venc.c +1 -4
@@ -1560,12 +1560,9 @@ static int venc_probe(struct platform_device *pdev)struct venus_core *core;int ret; -if (!dev->parent) -return -EPROBE_DEFER ; - core =dev_get_drvdata (dev->parent);if (!core) -return -EPROBE_DEFER ; +return -EINVAL ;platform_set_drvdata (pdev, core);
Signature · 1 line
2.49.1
Quoted 51 lines · Johan Hovold
The encoder and decoder platform devices are registered by the venus driver as children of the venus device, but even if someone were to mess this up no amount of probe deferring is going to conjure up a parent.
Relatedly, the venus driver sets its driver data before registering the child devices and if this ever breaks we want to learn about it by failing probe.
Signed-off-by Johan Hovold <[email protected]>--- drivers/media/platform/qcom/venus/vdec.c | 5 +---- drivers/media/platform/qcom/venus/venc.c | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-)drivers/media/platform/qcom/venus/vdec.c +1
-4@@ -1778,12 +1778,9 @@ static int vdec_probe(struct platform_device *pdev)struct venus_core *core;int ret; -if (!dev->parent) -return -EPROBE_DEFER ; - core =dev_get_drvdata (dev->parent);if (!core) -return -EPROBE_DEFER ; +return -EINVAL ;platform_set_drvdata (pdev, core);drivers/media/platform/qcom/venus/venc.c +1
-5@@ -1560,12 +1560,9 @@ static int venc_probe(struct platform_device *pdev)struct venus_core *core;int ret; -if (!dev->parent) -return -EPROBE_DEFER ; - core =dev_get_drvdata (dev->parent);if (!core) -return -EPROBE_DEFER ; +return -EINVAL ;platform_set_drvdata (pdev, core); --
Quoted 2 lines
2.49.1
Quoted 40 lines · Johan Hovold
The encoder and decoder platform devices are registered by the venus driver as children of the venus device, but even if someone were to mess this up no amount of probe deferring is going to conjure up a parent.
Relatedly, the venus driver sets its driver data before registering the child devices and if this ever breaks we want to learn about it by failing probe.
Signed-off-by Johan Hovold <[email protected]>--- drivers/media/platform/qcom/venus/vdec.c | 5 +---- drivers/media/platform/qcom/venus/venc.c | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-)drivers/media/platform/qcom/venus/vdec.c +1
-4@@ -1778,12 +1778,9 @@ static int vdec_probe(struct platform_device *pdev)struct venus_core *core;int ret; -if (!dev->parent) -return -EPROBE_DEFER ; - core =dev_get_drvdata (dev->parent);if (!core) -return -EPROBE_DEFER ; +return -EINVAL ;platform_set_drvdata (pdev, core);drivers/media/platform/qcom/venus/venc.c +0
-0@@ -1560,12 +1560,9 @@ static int venc_probe(struct platform_device *pdev)struct venus_core *core;int ret;
drivers/media/platform/qcom/venus/venc.c static int venc_probe(struct platform_device *pdev) · line 1568
Quoted 10 lines
drivers/media/platform/qcom/venus/venc.c +1
-4-if (!dev->parent) -return -EPROBE_DEFER ; - core =dev_get_drvdata (dev->parent);if (!core) -return -EPROBE_DEFER ; +return -EINVAL ;platform_set_drvdata (pdev, core);
Thanks,
Dikshita
Quoted 9 lines · Johan Hovold
The encoder and decoder platform devices are registered by the venus driver as children of the venus device, but even if someone were to mess this up no amount of probe deferring is going to conjure up a parent.
Relatedly, the venus driver sets its driver data before registering the child devices and if this ever breaks we want to learn about it by failing probe.
Signed-off-by Johan Hovold <[email protected]>