* [PATCH] serial: 8250_bcm2835aux: Restore clock error handling
@ 2023-12-20 11:43 Stefan Wahren
2024-01-03 17:33 ` Florian Fainelli
2024-01-10 0:01 ` Jeremy Linton
0 siblings, 2 replies; 4+ messages in thread
From: Stefan Wahren @ 2023-12-20 11:43 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby, Florian Fainelli
Cc: Ray Jui, Scott Branden, Adrien Thierry, Jeremy Linton,
linux-serial, bcm-kernel-feedback-list, linux-kernel,
linux-arm-kernel, Stefan Wahren
The commit fcc446c8aa63 ("serial: 8250_bcm2835aux: Add ACPI support")
dropped the error handling for clock acquiring. But even an optional
clock needs this.
Fixes: fcc446c8aa63 ("serial: 8250_bcm2835aux: Add ACPI support")
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
---
drivers/tty/serial/8250/8250_bcm2835aux.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/tty/serial/8250/8250_bcm2835aux.c b/drivers/tty/serial/8250/8250_bcm2835aux.c
index 15a2387a5b25..4f4502fb5454 100644
--- a/drivers/tty/serial/8250/8250_bcm2835aux.c
+++ b/drivers/tty/serial/8250/8250_bcm2835aux.c
@@ -119,6 +119,8 @@ static int bcm2835aux_serial_probe(struct platform_device *pdev)
/* get the clock - this also enables the HW */
data->clk = devm_clk_get_optional(&pdev->dev, NULL);
+ if (IS_ERR(data->clk))
+ return dev_err_probe(&pdev->dev, PTR_ERR(data->clk), "could not get clk\n");
/* get the interrupt */
ret = platform_get_irq(pdev, 0);
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] serial: 8250_bcm2835aux: Restore clock error handling
2023-12-20 11:43 [PATCH] serial: 8250_bcm2835aux: Restore clock error handling Stefan Wahren
@ 2024-01-03 17:33 ` Florian Fainelli
2024-01-10 0:01 ` Jeremy Linton
1 sibling, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2024-01-03 17:33 UTC (permalink / raw)
To: Stefan Wahren, Greg Kroah-Hartman, Jiri Slaby
Cc: Ray Jui, Scott Branden, Adrien Thierry, Jeremy Linton,
linux-serial, bcm-kernel-feedback-list, linux-kernel,
linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 400 bytes --]
On 12/20/23 03:43, Stefan Wahren wrote:
> The commit fcc446c8aa63 ("serial: 8250_bcm2835aux: Add ACPI support")
> dropped the error handling for clock acquiring. But even an optional
> clock needs this.
>
> Fixes: fcc446c8aa63 ("serial: 8250_bcm2835aux: Add ACPI support")
> Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
--
Florian
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4221 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] serial: 8250_bcm2835aux: Restore clock error handling
2023-12-20 11:43 [PATCH] serial: 8250_bcm2835aux: Restore clock error handling Stefan Wahren
2024-01-03 17:33 ` Florian Fainelli
@ 2024-01-10 0:01 ` Jeremy Linton
2024-01-10 8:49 ` Stefan Wahren
1 sibling, 1 reply; 4+ messages in thread
From: Jeremy Linton @ 2024-01-10 0:01 UTC (permalink / raw)
To: Stefan Wahren, Greg Kroah-Hartman, Jiri Slaby, Florian Fainelli
Cc: Ray Jui, Scott Branden, Adrien Thierry, linux-serial,
bcm-kernel-feedback-list, linux-kernel, linux-arm-kernel
Hi,
On 12/20/23 05:43, Stefan Wahren wrote:
> The commit fcc446c8aa63 ("serial: 8250_bcm2835aux: Add ACPI support")
> dropped the error handling for clock acquiring. But even an optional
> clock needs this.
Right, the call was changed to _optional() during review but the error
handling didn't get put back.
>
> Fixes: fcc446c8aa63 ("serial: 8250_bcm2835aux: Add ACPI support")
> Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
> ---
> drivers/tty/serial/8250/8250_bcm2835aux.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/tty/serial/8250/8250_bcm2835aux.c b/drivers/tty/serial/8250/8250_bcm2835aux.c
> index 15a2387a5b25..4f4502fb5454 100644
> --- a/drivers/tty/serial/8250/8250_bcm2835aux.c
> +++ b/drivers/tty/serial/8250/8250_bcm2835aux.c
> @@ -119,6 +119,8 @@ static int bcm2835aux_serial_probe(struct platform_device *pdev)
>
> /* get the clock - this also enables the HW */
> data->clk = devm_clk_get_optional(&pdev->dev, NULL);
> + if (IS_ERR(data->clk))
> + return dev_err_probe(&pdev->dev, PTR_ERR(data->clk), "could not get clk\n");
>
> /* get the interrupt */
> ret = platform_get_irq(pdev, 0);
> --
And on ACPI machines it returns NULL, which passes the error check now,
so it works on an ACPI based pi.
Thanks!
Reviewed-by: Jeremy Linton <jeremy.linton@arm.com>
Tested-by: Jeremy Linton <jeremy.linton@arm.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] serial: 8250_bcm2835aux: Restore clock error handling
2024-01-10 0:01 ` Jeremy Linton
@ 2024-01-10 8:49 ` Stefan Wahren
0 siblings, 0 replies; 4+ messages in thread
From: Stefan Wahren @ 2024-01-10 8:49 UTC (permalink / raw)
To: Jeremy Linton, Greg Kroah-Hartman, Jiri Slaby, Florian Fainelli
Cc: Ray Jui, Scott Branden, Adrien Thierry, linux-serial,
bcm-kernel-feedback-list, linux-kernel, linux-arm-kernel
Hi Jeremy,
Am 10.01.24 um 01:01 schrieb Jeremy Linton:
> Hi,
>
>
> On 12/20/23 05:43, Stefan Wahren wrote:
>> The commit fcc446c8aa63 ("serial: 8250_bcm2835aux: Add ACPI support")
>> dropped the error handling for clock acquiring. But even an optional
>> clock needs this.
>
> Right, the call was changed to _optional() during review but the error
> handling didn't get put back.
>
>>
>> Fixes: fcc446c8aa63 ("serial: 8250_bcm2835aux: Add ACPI support")
>> Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
>> ---
>> drivers/tty/serial/8250/8250_bcm2835aux.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/tty/serial/8250/8250_bcm2835aux.c
>> b/drivers/tty/serial/8250/8250_bcm2835aux.c
>> index 15a2387a5b25..4f4502fb5454 100644
>> --- a/drivers/tty/serial/8250/8250_bcm2835aux.c
>> +++ b/drivers/tty/serial/8250/8250_bcm2835aux.c
>> @@ -119,6 +119,8 @@ static int bcm2835aux_serial_probe(struct
>> platform_device *pdev)
>>
>> /* get the clock - this also enables the HW */
>> data->clk = devm_clk_get_optional(&pdev->dev, NULL);
>> + if (IS_ERR(data->clk))
>> + return dev_err_probe(&pdev->dev, PTR_ERR(data->clk), "could
>> not get clk\n");
>>
>> /* get the interrupt */
>> ret = platform_get_irq(pdev, 0);
>> --
>
> And on ACPI machines it returns NULL, which passes the error check
> now, so it works on an ACPI based pi.
>
> Thanks!
>
> Reviewed-by: Jeremy Linton <jeremy.linton@arm.com>
> Tested-by: Jeremy Linton <jeremy.linton@arm.com>
thanks for testing. The patch is already in linux-next.
Regards
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-01-10 8:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-20 11:43 [PATCH] serial: 8250_bcm2835aux: Restore clock error handling Stefan Wahren
2024-01-03 17:33 ` Florian Fainelli
2024-01-10 0:01 ` Jeremy Linton
2024-01-10 8:49 ` Stefan Wahren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).