lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 19 Aug 2008 15:34:37 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
Cc:	linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org,
	rjw@...k.pl
Subject: Re: [PATCH 2/2] ide: add proper PCI PM support

On Sat, 2 Aug 2008 19:17:04 +0200
Bartlomiej Zolnierkiewicz <bzolnier@...il.com> wrote:

> -static unsigned int __devinit init_chipset_aec62xx(struct pci_dev *dev)
> +static unsigned int init_chipset_aec62xx(struct pci_dev *dev)
>  {
>  	/* These are necessary to get AEC6280 Macintosh cards to work */
>  	if ((dev->device == PCI_DEVICE_ID_ARTOP_ATP865) ||
> @@ -307,6 +307,10 @@ static struct pci_driver driver = {
>  	.id_table	= aec62xx_pci_tbl,
>  	.probe		= aec62xx_init_one,
>  	.remove		= aec62xx_remove,
> +#ifdef CONFIG_PM
> +	.suspend	= ide_pci_suspend,
> +	.resume		= ide_pci_resume,
> +#endif
>  };
>  
>  static int __init aec62xx_ide_init(void)
> Index: b/drivers/ide/pci/alim15x3.c
> ===================================================================
> --- a/drivers/ide/pci/alim15x3.c
> +++ b/drivers/ide/pci/alim15x3.c
> @@ -213,7 +213,7 @@ static int ali15x3_dma_setup(ide_drive_t
>   *	appropriate also sets up the 1533 southbridge.
>   */
>  
> -static unsigned int __devinit init_chipset_ali15x3(struct pci_dev *dev)
> +static unsigned int init_chipset_ali15x3(struct pci_dev *dev)
>  {
>  	unsigned long flags;
>  	u8 tmpbyte;
> @@ -581,6 +581,10 @@ static struct pci_driver driver = {
>  	.id_table	= alim15x3_pci_tbl,
>  	.probe		= alim15x3_init_one,
>  	.remove		= ide_pci_remove,
> +#ifdef CONFIG_PM
> +	.suspend	= ide_pci_suspend,
> +	.resume		= ide_pci_resume,
> +#endif

Please do

#ifndef CONFIG_PM
#define ide_pci_suspend NULL
#define ide_pci_resume NULL
#endif

in a header file and then remove all these ifdefs.

It's a pretty common convention and will clean things up rather a lot.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ