public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: tony@bakeyournoodle•com (Tony Breeds)
To: Guennadi Liakhovetski <g.liakhovetski@gmx•de>
Cc: linuxppc-dev@ozlabs•org, linux-pm@lists•linux-foundation.org
Subject: Re: [PATCH, RFC] linkstation: implement standby
Date: Mon, 27 Aug 2007 10:44:28 +1000	[thread overview]
Message-ID: <20070827004428.GD10345@bakeyournoodle.com> (raw)
In-Reply-To: <Pine.LNX.4.60.0708260157330.3809@poirot.grange>

On Sun, Aug 26, 2007 at 02:03:49AM +0200, Guennadi Liakhovetski wrote:
> Implement suspend/resume for "mpc10x" compatible fsl host PCI controllers, 
> use it for linkstation standby.

Hi Guennadi

<snip>

> +static int __init ls_pm_init(void)
> +{
> +	if (!machine_is(linkstation))
> +		return 0;

This should probably be -ENODEV.

<snip>

> +int mpc10x_suspend(suspend_state_t state)

You only seem to call this from ls_pm_enter() where you don't check the
return value, perhaps this should be void ?

> +{
> +	struct pci_dev *bridge;
> +	u16 pmcr1;
> +
> +	bridge = pci_find_slot(0, 0);
> +	if (!bridge)
> +		return -ENODEV;

I think you want pci_get_bus_and_slot() here instead of pci_find_slot(),
in fact I think it'd be cleaner, if you located the bridge in
ls_pm_enter() and passed it in.

> +int mpc10x_resume(suspend_state_t state)
> +{
> +	struct pci_dev *bridge;
> +	u16 pmcr1;
> +
> +	bridge = pci_find_slot(0, 0);
> +	if (!bridge)
> +		return -ENODEV;

Same comments ass mpc10x_suspend();

Yours Tony

  linux.conf.au        http://linux.conf.au/ || http://lca2008.linux.org.au/
  Jan 28 - Feb 02 2008 The Australian Linux Technical Conference!

  parent reply	other threads:[~2007-08-27  0:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-26  0:03 [PATCH, RFC] linkstation: implement standby Guennadi Liakhovetski
2007-08-26  1:08 ` Stephen Rothwell
2007-08-26 19:10   ` Guennadi Liakhovetski
2007-08-27  0:44 ` Tony Breeds [this message]
2007-08-27 10:03 ` [linux-pm] " Pavel Machek
2007-08-27 11:32 ` Johannes Berg
2007-08-28 22:30   ` Guennadi Liakhovetski
2007-08-29 10:32     ` Johannes Berg

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=20070827004428.GD10345@bakeyournoodle.com \
    --to=tony@bakeyournoodle$(echo .)com \
    --cc=g.liakhovetski@gmx$(echo .)de \
    --cc=linux-pm@lists$(echo .)linux-foundation.org \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox