From: Nikhil Dharashivkar <nikhildharashivkar@gmail.com>
To: "Martin J. Bligh" <mbligh@mbligh.org>
Cc: Andrew Morton <akpm@osdl.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] remove warning about e1000_suspend
Date: Mon, 8 Aug 2005 11:39:07 +0530 [thread overview]
Message-ID: <17db6d3a05080723096ec26531@mail.gmail.com> (raw)
In-Reply-To: <256850000.1123442258@10.10.2.4>
Hi Martin,
But e1000_notify_reboot () function calls this e1000_suspend()
function irrespective of CONFIG_FM is defined or not. So according to
your soution, what if CONFIG_FM is not defined.
On 8/8/05, Martin J. Bligh <mbligh@mbligh.org> wrote:
> e1000_suspend is only used under #ifdef CONFIG_PM. Move the declaration
> of it to be the same way, just like e1000_resume, otherwise gcc whines
> on compile. I offer as evidence:
>
> static struct pci_driver e1000_driver = {
> .name = e1000_driver_name,
> .id_table = e1000_pci_tbl,
> .probe = e1000_probe,
> .remove = __devexit_p(e1000_remove),
> /* Power Managment Hooks */
> #ifdef CONFIG_PM
> .suspend = e1000_suspend,
> .resume = e1000_resume
> #endif
> };
>
>
> diff -aurpN -X /home/fletch/.diff.exclude virgin/drivers/net/e1000/e1000_main.c e1000_suspend/drivers/net/e1000/e1000_main.c
> --- virgin/drivers/net/e1000/e1000_main.c 2005-08-07 09:15:36.000000000 -0700
> +++ e1000_suspend/drivers/net/e1000/e1000_main.c 2005-08-07 12:10:42.000000000 -0700
> @@ -162,8 +162,8 @@ static void e1000_vlan_rx_add_vid(struct
> static void e1000_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid);
> static void e1000_restore_vlan(struct e1000_adapter *adapter);
>
> -static int e1000_suspend(struct pci_dev *pdev, uint32_t state);
> #ifdef CONFIG_PM
> +static int e1000_suspend(struct pci_dev *pdev, uint32_t state);
> static int e1000_resume(struct pci_dev *pdev);
> #endif
>
> @@ -3641,6 +3641,7 @@ e1000_set_spd_dplx(struct e1000_adapter
> return 0;
> }
>
> +#ifdef CONFIG_PM
> static int
> e1000_suspend(struct pci_dev *pdev, uint32_t state)
> {
> @@ -3733,7 +3734,6 @@ e1000_suspend(struct pci_dev *pdev, uint
> return 0;
> }
>
> -#ifdef CONFIG_PM
> static int
> e1000_resume(struct pci_dev *pdev)
> {
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
--
Thanks and Regards,
Nikhil.
next parent reply other threads:[~2005-08-08 6:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <256850000.1123442258@10.10.2.4>
2005-08-08 6:09 ` Nikhil Dharashivkar [this message]
2005-08-08 6:16 ` [PATCH] remove warning about e1000_suspend Martin J. Bligh
2005-08-08 8:49 ` Michael Ellerman
2005-08-08 14:57 ` Martin J. Bligh
2005-08-07 19:17 Martin J. Bligh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=17db6d3a05080723096ec26531@mail.gmail.com \
--to=nikhildharashivkar@gmail.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mbligh@mbligh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.