* [PATCH for 4.19] Revert "spi: mt7621: Fix an error message in mt7621_spi_probe()"
@ 2023-03-01 21:23 Nobuhiro Iwamatsu
2023-03-13 15:58 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Nobuhiro Iwamatsu @ 2023-03-01 21:23 UTC (permalink / raw)
To: stable; +Cc: gregkh, sashal, Nobuhiro Iwamatsu
This reverts commit 269f650a0b26067092873308117e0bf0c6ec8289 which is
commit 2b2bf6b7faa9010fae10dc7de76627a3fdb525b3 upstream.
dev_err_probe() does not suppot in 4.19.y. So this driver will fail to
build.
```
CC drivers/staging/mt7621-spi/spi-mt7621.o
drivers/staging/mt7621-spi/spi-mt7621.c: In function 'mt7621_spi_probe':
drivers/staging/mt7621-spi/spi-mt7621.c:446:24: error: implicit declaration of function 'dev_err_probe'; did you mean 'device_reprobe'? [-Werror=implicit-function-declaration]
446 | return dev_err_probe(&pdev->dev, PTR_ERR(clk),
| ^~~~~~~~~~~~~
| device_reprobe
```
Signed-off-by: Nobuhiro Iwamatsu (CIP) <nobuhiro1.iwamatsu@toshiba.co.jp>
---
drivers/staging/mt7621-spi/spi-mt7621.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/mt7621-spi/spi-mt7621.c b/drivers/staging/mt7621-spi/spi-mt7621.c
index b73823830e3a73..75ed48f60c8c7f 100644
--- a/drivers/staging/mt7621-spi/spi-mt7621.c
+++ b/drivers/staging/mt7621-spi/spi-mt7621.c
@@ -442,9 +442,11 @@ static int mt7621_spi_probe(struct platform_device *pdev)
return PTR_ERR(base);
clk = devm_clk_get(&pdev->dev, NULL);
- if (IS_ERR(clk))
- return dev_err_probe(&pdev->dev, PTR_ERR(clk),
- "unable to get SYS clock\n");
+ if (IS_ERR(clk)) {
+ dev_err(&pdev->dev, "unable to get SYS clock, err=%d\n",
+ status);
+ return PTR_ERR(clk);
+ }
status = clk_prepare_enable(clk);
if (status)
--
2.36.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH for 4.19] Revert "spi: mt7621: Fix an error message in mt7621_spi_probe()"
2023-03-01 21:23 [PATCH for 4.19] Revert "spi: mt7621: Fix an error message in mt7621_spi_probe()" Nobuhiro Iwamatsu
@ 2023-03-13 15:58 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2023-03-13 15:58 UTC (permalink / raw)
To: Nobuhiro Iwamatsu; +Cc: stable, sashal
On Thu, Mar 02, 2023 at 06:23:50AM +0900, Nobuhiro Iwamatsu wrote:
> This reverts commit 269f650a0b26067092873308117e0bf0c6ec8289 which is
> commit 2b2bf6b7faa9010fae10dc7de76627a3fdb525b3 upstream.
>
> dev_err_probe() does not suppot in 4.19.y. So this driver will fail to
> build.
>
> ```
> CC drivers/staging/mt7621-spi/spi-mt7621.o
> drivers/staging/mt7621-spi/spi-mt7621.c: In function 'mt7621_spi_probe':
> drivers/staging/mt7621-spi/spi-mt7621.c:446:24: error: implicit declaration of function 'dev_err_probe'; did you mean 'device_reprobe'? [-Werror=implicit-function-declaration]
> 446 | return dev_err_probe(&pdev->dev, PTR_ERR(clk),
> | ^~~~~~~~~~~~~
> | device_reprobe
> ```
>
> Signed-off-by: Nobuhiro Iwamatsu (CIP) <nobuhiro1.iwamatsu@toshiba.co.jp>
> ---
> drivers/staging/mt7621-spi/spi-mt7621.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/mt7621-spi/spi-mt7621.c b/drivers/staging/mt7621-spi/spi-mt7621.c
> index b73823830e3a73..75ed48f60c8c7f 100644
> --- a/drivers/staging/mt7621-spi/spi-mt7621.c
> +++ b/drivers/staging/mt7621-spi/spi-mt7621.c
> @@ -442,9 +442,11 @@ static int mt7621_spi_probe(struct platform_device *pdev)
> return PTR_ERR(base);
>
> clk = devm_clk_get(&pdev->dev, NULL);
> - if (IS_ERR(clk))
> - return dev_err_probe(&pdev->dev, PTR_ERR(clk),
> - "unable to get SYS clock\n");
> + if (IS_ERR(clk)) {
> + dev_err(&pdev->dev, "unable to get SYS clock, err=%d\n",
> + status);
> + return PTR_ERR(clk);
> + }
>
> status = clk_prepare_enable(clk);
> if (status)
> --
> 2.36.1
>
>
Nice fix, thanks for finding this, now queued up.
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-13 15:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-01 21:23 [PATCH for 4.19] Revert "spi: mt7621: Fix an error message in mt7621_spi_probe()" Nobuhiro Iwamatsu
2023-03-13 15:58 ` Greg KH
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.