[linuxppc-release] [PATCH] powerpc/fsl-pci: Add PCI controller ATMU PM support

Timur Tabi timur at freescale.com
Fri Nov 2 00:25:54 EST 2012


Jia Hongtao wrote:

> +#ifdef CONFIG_SUSPEND
> +static int fsl_pci_resume(struct platform_device *pdev)
> +{
> +	struct pci_controller *hose;
> +	struct resource pci_rsrc;
> +
> +	hose = pci_find_hose_for_OF_device(pdev->dev.of_node);
> +	of_address_to_resource(pdev->dev.of_node, 0, &pci_rsrc);
> +	setup_pci_atmu(hose, &pci_rsrc);
> +
> +	return 0;
> +}

Some of these functions can fail, so they should return an error code if
they do.

> +#endif
> +
>  static struct platform_driver fsl_pci_driver = {
>  	.driver = {
>  		.name = "fsl-pci",
>  		.of_match_table = pci_ids,
>  	},
>  	.probe = fsl_pci_probe,
> +#ifdef CONFIG_SUSPEND
> +	.resume	= fsl_pci_resume,
> +#endif

Do this instead:

#ifdef CONFIG_SUSPEND
static int fsl_pci_resume(struct platform_device *pdev)
...
#else
#define fsl_pci_resume NULL
#endif

-- 
Timur Tabi
Linux kernel developer at Freescale



More information about the Linuxppc-dev mailing list