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

Timur Tabi b04825 at freescale.com
Tue Nov 6 06:18:38 EST 2012


Jia Hongtao-B38951 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.
> 
> I checked the of_address_to_resource function now.
> Is that necessary to check other two fuctions?

Yes, check to ensure that 'hose' is not NULL.

-- 
Timur Tabi
Linux kernel developer at Freescale



More information about the Linuxppc-dev mailing list