linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dma: intel_mid_dma: remove redundant pci_set_drvdata calls
@ 2011-07-19  6:48 Axel Lin
  2011-07-25 14:25 ` Vinod Koul
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2011-07-19  6:48 UTC (permalink / raw)
  To: linux-kernel; +Cc: Yong Wang, Vinod Koul, Dan Williams

Call pci_set_drvdata() once in intel_mid_dma_probe() is enough.
Remove redundant pci_set_drvdata() calls in dma_suspend() and dma_resume().

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/dma/intel_mid_dma.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/drivers/dma/intel_mid_dma.c b/drivers/dma/intel_mid_dma.c
index f653517..8a3fdd8 100644
--- a/drivers/dma/intel_mid_dma.c
+++ b/drivers/dma/intel_mid_dma.c
@@ -1351,7 +1351,6 @@ int dma_suspend(struct pci_dev *pci, pm_message_t state)
 			return -EAGAIN;
 	}
 	device->state = SUSPENDED;
-	pci_set_drvdata(pci, device);
 	pci_save_state(pci);
 	pci_disable_device(pci);
 	pci_set_power_state(pci, PCI_D3hot);
@@ -1380,7 +1379,6 @@ int dma_resume(struct pci_dev *pci)
 	}
 	device->state = RUNNING;
 	iowrite32(REG_BIT0, device->dma_base + DMA_CFG);
-	pci_set_drvdata(pci, device);
 	return 0;
 }
 
-- 
1.7.4.1




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] dma: intel_mid_dma: remove redundant pci_set_drvdata calls
  2011-07-19  6:48 [PATCH] dma: intel_mid_dma: remove redundant pci_set_drvdata calls Axel Lin
@ 2011-07-25 14:25 ` Vinod Koul
  0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2011-07-25 14:25 UTC (permalink / raw)
  To: Axel Lin; +Cc: vinod.koul, linux-kernel, Yong Wang, Dan Williams

On Tue, 2011-07-19 at 14:48 +0800, Axel Lin wrote:
> Call pci_set_drvdata() once in intel_mid_dma_probe() is enough.
> Remove redundant pci_set_drvdata() calls in dma_suspend() and dma_resume().
> 
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---
>  drivers/dma/intel_mid_dma.c |    2 --
>  1 files changed, 0 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/dma/intel_mid_dma.c b/drivers/dma/intel_mid_dma.c
> index f653517..8a3fdd8 100644
> --- a/drivers/dma/intel_mid_dma.c
> +++ b/drivers/dma/intel_mid_dma.c
> @@ -1351,7 +1351,6 @@ int dma_suspend(struct pci_dev *pci, pm_message_t state)
>  			return -EAGAIN;
>  	}
>  	device->state = SUSPENDED;
> -	pci_set_drvdata(pci, device);
>  	pci_save_state(pci);
>  	pci_disable_device(pci);
>  	pci_set_power_state(pci, PCI_D3hot);
> @@ -1380,7 +1379,6 @@ int dma_resume(struct pci_dev *pci)
>  	}
>  	device->state = RUNNING;
>  	iowrite32(REG_BIT0, device->dma_base + DMA_CFG);
> -	pci_set_drvdata(pci, device);
>  	return 0;
>  }
>  
Applied, Thanks

-- 
~Vinod Koul
Intel Corp.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-07-25 14:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-19  6:48 [PATCH] dma: intel_mid_dma: remove redundant pci_set_drvdata calls Axel Lin
2011-07-25 14:25 ` Vinod Koul

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).