Subject: [PATCH 5/6] leds: apu: fix error on probing failure

From: Enrico Weigelt <[email protected]>

The current error message on failed probing tends to be a bit
misleading. Fix it to tell exactly that an APU v1 was not found.

Signed-off-by: Enrico Weigelt <[email protected]>
---
drivers/leds/leds-apu.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/leds/leds-apu.c b/drivers/leds/leds-apu.c
index 451cb9f..892fea7 100644
--- a/drivers/leds/leds-apu.c
+++ b/drivers/leds/leds-apu.c
@@ -170,13 +170,9 @@ static int __init apu_led_init(void)
struct platform_device *pdev;
int err;

- if (!dmi_match(DMI_SYS_VENDOR, "PC Engines")) {
- pr_err("No PC Engines board detected\n");
- return -ENODEV;
- }
- if (!(dmi_match(DMI_PRODUCT_NAME, "APU"))) {
- pr_err("Unknown PC Engines board: %s\n",
- dmi_get_system_info(DMI_PRODUCT_NAME));
+ if (!(dmi_match(DMI_SYS_VENDOR, "PC Engines") &&
+ dmi_match(DMI_PRODUCT_NAME, "APU"))) {
+ pr_err("No PC Engines APUv1 board detected\n");
return -ENODEV;
}

--
1.9.1


2019-07-16 19:30:12

by Pavel Machek

[permalink] [raw]
Subject: Re: [PATCH 5/6] leds: apu: fix error on probing failure

On Mon 2019-07-15 16:57:32, Enrico Weigelt, metux IT consult wrote:
> From: Enrico Weigelt <[email protected]>
>
> The current error message on failed probing tends to be a bit
> misleading. Fix it to tell exactly that an APU v1 was not found.
>
> Signed-off-by: Enrico Weigelt <[email protected]>
> ---
> drivers/leds/leds-apu.c | 10 +++-------
> 1 file changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/leds/leds-apu.c b/drivers/leds/leds-apu.c
> index 451cb9f..892fea7 100644
> --- a/drivers/leds/leds-apu.c
> +++ b/drivers/leds/leds-apu.c
> @@ -170,13 +170,9 @@ static int __init apu_led_init(void)
> struct platform_device *pdev;
> int err;
>
> - if (!dmi_match(DMI_SYS_VENDOR, "PC Engines")) {
> - pr_err("No PC Engines board detected\n");
> - return -ENODEV;
> - }
> - if (!(dmi_match(DMI_PRODUCT_NAME, "APU"))) {
> - pr_err("Unknown PC Engines board: %s\n",
> - dmi_get_system_info(DMI_PRODUCT_NAME));
> + if (!(dmi_match(DMI_SYS_VENDOR, "PC Engines") &&
> + dmi_match(DMI_PRODUCT_NAME, "APU"))) {
> + pr_err("No PC Engines APUv1 board detected\n");

You may want to add here: "For APUv2,3 support, enable CONFIG_xxx".

If you have any APUv2 users (and you may), this si chance to get their
attention.

Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


Attachments:
(No filename) (1.40 kB)
signature.asc (188.00 B)
Digital signature
Download all attachments
Subject: Re: [PATCH 5/6] leds: apu: fix error on probing failure

On 16.07.19 21:28, Pavel Machek wrote:

> You may want to add here: "For APUv2,3 support, enable CONFIG_xxx".
>
> If you have any APUv2 users (and you may), this si chance to get their
> attention.

Good idea. Shall I repost a changed patch ? (or repost the whole queue)


--mtx

--
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
[email protected] -- +49-151-27565287

2019-07-17 16:38:27

by Jacek Anaszewski

[permalink] [raw]
Subject: Re: [PATCH 5/6] leds: apu: fix error on probing failure

Hi Enrico

On 7/17/19 4:29 PM, Enrico Weigelt, metux IT consult wrote:
> On 16.07.19 21:28, Pavel Machek wrote:
>
>> You may want to add here: "For APUv2,3 support, enable CONFIG_xxx".
>>
>> If you have any APUv2 users (and you may), this si chance to get their
>> attention.
>
> Good idea. Shall I repost a changed patch ? (or repost the whole queue)

Please send only the patch in question (and bump the version).

--
Best regards,
Jacek Anaszewski

Subject: [PATCH v2] leds: apu: fix error message on probing failure

From: Enrico Weigelt <[email protected]>

The current error message on failed probing tends to be a bit
misleading. Fix it to tell exactly that an APU v1 was not found.

Signed-off-by: Enrico Weigelt <[email protected]>
---
drivers/leds/leds-apu.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/leds/leds-apu.c b/drivers/leds/leds-apu.c
index 451cb9f..d794f49 100644
--- a/drivers/leds/leds-apu.c
+++ b/drivers/leds/leds-apu.c
@@ -170,13 +170,9 @@ static int __init apu_led_init(void)
struct platform_device *pdev;
int err;

- if (!dmi_match(DMI_SYS_VENDOR, "PC Engines")) {
- pr_err("No PC Engines board detected\n");
- return -ENODEV;
- }
- if (!(dmi_match(DMI_PRODUCT_NAME, "APU"))) {
- pr_err("Unknown PC Engines board: %s\n",
- dmi_get_system_info(DMI_PRODUCT_NAME));
+ if (!(dmi_match(DMI_SYS_VENDOR, "PC Engines") &&
+ dmi_match(DMI_PRODUCT_NAME, "APU"))) {
+ pr_err("No PC Engines APUv1 board detected. For APUv2,3 support, enable CONFIG_PCENGINES_APU2\n");
return -ENODEV;
}

--
1.9.1

Subject: [PATCH v2] leds: apu: fix error message on probing failure

From: Enrico Weigelt <[email protected]>

The current error message on failed probing tends to be a bit
misleading. Fix it to tell exactly that an APU v1 was not found.

Signed-off-by: Enrico Weigelt <[email protected]>
---
drivers/leds/leds-apu.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/leds/leds-apu.c b/drivers/leds/leds-apu.c
index 451cb9f..d794f49 100644
--- a/drivers/leds/leds-apu.c
+++ b/drivers/leds/leds-apu.c
@@ -170,13 +170,9 @@ static int __init apu_led_init(void)
struct platform_device *pdev;
int err;

- if (!dmi_match(DMI_SYS_VENDOR, "PC Engines")) {
- pr_err("No PC Engines board detected\n");
- return -ENODEV;
- }
- if (!(dmi_match(DMI_PRODUCT_NAME, "APU"))) {
- pr_err("Unknown PC Engines board: %s\n",
- dmi_get_system_info(DMI_PRODUCT_NAME));
+ if (!(dmi_match(DMI_SYS_VENDOR, "PC Engines") &&
+ dmi_match(DMI_PRODUCT_NAME, "APU"))) {
+ pr_err("No PC Engines APUv1 board detected. For APUv2,3 support, enable CONFIG_PCENGINES_APU2\n");
return -ENODEV;
}

--
1.9.1

2019-07-22 15:38:30

by Pavel Machek

[permalink] [raw]
Subject: Re: [PATCH v2] leds: apu: fix error message on probing failure

On Mon 2019-07-22 14:08:51, Enrico Weigelt, metux IT consult wrote:
> From: Enrico Weigelt <[email protected]>
>
> The current error message on failed probing tends to be a bit
> misleading. Fix it to tell exactly that an APU v1 was not found.
>
> Signed-off-by: Enrico Weigelt <[email protected]>

Acked-by: Pavel Machek <[email protected]>

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


Attachments:
(No filename) (483.00 B)
signature.asc (188.00 B)
Digital signature
Download all attachments