diff mbox

[v1] spi: dw: amend warning message

Message ID 1420207565-14712-1-git-send-email-andriy.shevchenko@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Andy Shevchenko Jan. 2, 2015, 2:06 p.m. UTC
In case of warning message in ->probe() we have to use HW device name instead
of master because last is not defined yet.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/spi/spi-dw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andy Shevchenko Jan. 2, 2015, 2:11 p.m. UTC | #1
On Fri, 2015-01-02 at 16:06 +0200, Andy Shevchenko wrote:
> In case of warning message in ->probe() we have to use HW device name instead
> of master because last is not defined yet.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/spi/spi-dw.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c
> index 7de8b50..83d17e38 100644
> --- a/drivers/spi/spi-dw.c
> +++ b/drivers/spi/spi-dw.c
> @@ -659,7 +659,7 @@ int dw_spi_add_host(struct device *dev, struct dw_spi *dws)
>  	if (dws->dma_ops && dws->dma_ops->dma_init) {
>  		ret = dws->dma_ops->dma_init(dws);
>  		if (ret) {
> -			dev_warn(&master->dev, "DMA init failed\n");
> +			dev_warn(dev, "DMA init failed\n");
>  			dws->dma_inited = 0;
>  		} else {
>  			master->can_dma = dws->dma_ops->can_dma;

Oops, based on some WIP patches, though still applies smoothly on top of
recent linux-next.
Mark Brown Jan. 5, 2015, 8:21 p.m. UTC | #2
On Fri, Jan 02, 2015 at 04:11:08PM +0200, Andy Shevchenko wrote:
> On Fri, 2015-01-02 at 16:06 +0200, Andy Shevchenko wrote:

> > +			dev_warn(dev, "DMA init failed\n");

> Oops, based on some WIP patches, though still applies smoothly on top of
> recent linux-next.

Not with git am it doesn't (I suspect mostly because it's easily
confused by not having the required SHA1s but still).
Andy Shevchenko Jan. 7, 2015, 2:58 p.m. UTC | #3
On Mon, 2015-01-05 at 20:21 +0000, Mark Brown wrote:
> On Fri, Jan 02, 2015 at 04:11:08PM +0200, Andy Shevchenko wrote:
> > On Fri, 2015-01-02 at 16:06 +0200, Andy Shevchenko wrote:
> 
> > > +			dev_warn(dev, "DMA init failed\n");
> 
> > Oops, based on some WIP patches, though still applies smoothly on top of
> > recent linux-next.
> 
> Not with git am it doesn't (I suspect mostly because it's easily
> confused by not having the required SHA1s but still).

git am -C1 -s helps, but anyway I submitted v2 with one additional patch
(the add-on I suggested to Alex Lin to print FIFO size when
autodetection happened).
diff mbox

Patch

diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c
index 7de8b50..83d17e38 100644
--- a/drivers/spi/spi-dw.c
+++ b/drivers/spi/spi-dw.c
@@ -659,7 +659,7 @@  int dw_spi_add_host(struct device *dev, struct dw_spi *dws)
 	if (dws->dma_ops && dws->dma_ops->dma_init) {
 		ret = dws->dma_ops->dma_init(dws);
 		if (ret) {
-			dev_warn(&master->dev, "DMA init failed\n");
+			dev_warn(dev, "DMA init failed\n");
 			dws->dma_inited = 0;
 		} else {
 			master->can_dma = dws->dma_ops->can_dma;