mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
media: camera: Use of_pwm_xlate_with_flags()
In Linux v6.11, commit d6f66e292676 ("pwm: Make pwm_request_from_chip()
private to the core") made the function pwm_request_from_chip() a
private function to the PWM core driver. This function is used by both
the CDI and ISC camera drivers and so these driver no longer build
against Linux v6.11.
Fix this by updating the CDI and ISC drivers to use the function
of_pwm_xlate_with_flags() which has been supported since Linux v3.8.
This function internally calls pwm_request_from_chip() and configures
the pwm->args.period parameter and is therefore, equivalent to the
existing code.
Bug 4749580
Change-Id: Id1381ebc08730aaaa6c3591d90bcc4cc95a6c235
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3176063
Reviewed-by: Frank Chen <frankc@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
acc19f5003
commit
f308807197
@@ -105,8 +105,11 @@ static struct pwm_device *of_cdi_pwm_xlate(struct pwm_chip *pc,
|
|||||||
#endif
|
#endif
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
|
||||||
pwm = pwm_request_from_chip(pc, args->args[0], NULL);
|
pwm = of_pwm_xlate_with_flags(pc, args);
|
||||||
if (!args->args[1]) {
|
if (IS_ERR(pwm))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
if (!pwm->args.period) {
|
||||||
dev_err(dev, "Period should be larger than 0\n");
|
dev_err(dev, "Period should be larger than 0\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,8 +105,11 @@ static struct pwm_device *of_isc_pwm_xlate(struct pwm_chip *pc,
|
|||||||
#endif
|
#endif
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
|
||||||
pwm = pwm_request_from_chip(pc, args->args[0], NULL);
|
pwm = of_pwm_xlate_with_flags(pc, args);
|
||||||
if (!args->args[1]) {
|
if (IS_ERR(pwm))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
if (!pwm->args.period) {
|
||||||
dev_err(dev, "Period should be larger than 0\n");
|
dev_err(dev, "Period should be larger than 0\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user