Re: [PATCH 1/4] aic7xxx: Add suspend/resume support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I think this needs a little restructuring. ahd_pci_suspend/ahd_pci_resume
should be merged into their callers and use the normal Linux pci accessors,
and ahd_suspend/ahd_resume are tiny enough to merged into the caller aswell.

> +#ifdef CONFIG_PM
> +	.suspend	= ahd_linux_pci_dev_suspend,
> +	.resume		= ahd_linux_pci_dev_resume,
> +#endif
>  	.remove		= ahd_linux_pci_dev_remove,
>  	.id_table	= ahd_linux_pci_id_table
>  };
>  
> +static int
> +ahd_linux_pci_dev_suspend(struct pci_dev *pdev, pm_message_t mesg)

I think this needsa #ifdef CONFIG_PM aswell.  Also any chance you
could implement functions before their use so we can avoid forward
declarations.

> +{
> +	struct ahd_softc *ahd = pci_get_drvdata(pdev);
> +	int rc;
> +
> +	if ((rc = ahd_suspend(ahd)))
> +		return rc;

	rc = ahd_suspend(ahd)
	if (rc)
		return rc;

but as I mentioned above better just inline the content of ahd_suspend
into this function. That would also catch that ahd_suspend returns
positive errno values and we'd have to invert them here.

Same comments apply to the aic7xxx portion.
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux