Subject: Re: [PATCH 1/5] bcma: convert suspend/resume to pm_ops

From: "Arend van Spriel" <[email-masked]>
Date: Fri, 13 Jan 2012 10:58:35 +0100

On 01/13/2012 09:00 AM, Linus Torvalds wrote:
> 
> From: Linus Torvalds <[email-masked]>
> Date: Thu, 12 Jan 2012 22:47:01 -0800
> 
> .. and avoid doing th eunnecessary PCI operations - the PCI layer will do them for us.
> 
> Signed-off-by: Linus Torvalds <[email-masked]>
> ---
>  drivers/bcma/host_pci.c |   38 +++++++++++++-------------------------
>  1 files changed, 13 insertions(+), 25 deletions(-)
> 
> diff --git a/drivers/bcma/host_pci.c b/drivers/bcma/host_pci.c
> index 443b83a2fd7a..3aee641c9b7b 100644
> --- a/drivers/bcma/host_pci.c
> +++ b/drivers/bcma/host_pci.c
> @@ -235,38 +235,27 @@ static void bcma_host_pci_remove(struct pci_dev *dev)
>  }
>  
>  #ifdef CONFIG_PM
> -static int bcma_host_pci_suspend(struct pci_dev *dev, pm_message_t state)
> +static int bcma_suspend(struct device *dev)

All functions in host_pci.c start with bcma_host_pci_ prefix. Can we
stick to that convention?

>  {
> -	/* Host specific */
> -	pci_save_state(dev);
> -	pci_disable_device(dev);
> -	pci_set_power_state(dev, pci_choose_state(dev, state));
> -
>  	return 0;
>  }
>  
> -static int bcma_host_pci_resume(struct pci_dev *dev)
> +static int bcma_resume(struct device *dev)

Same here. It does not refer to the type of the device parameter.

Gr. AvS