From: Adrian Bunk <bunk@stusta.de>
To: LM Sensors <sensors@stimpy.netroedge.com>,
LKML <linux-kernel@vger.kernel.org>
Cc: greg@kroah.com
Subject: Re: [2.6 patch] i2c-core.c: make some code static
Date: Mon, 31 Jan 2005 22:46:22 +0100 [thread overview]
Message-ID: <20050131214622.GF21437@stusta.de> (raw)
In-Reply-To: <20050131215050.61c2924c.khali@linux-fr.org>
On Mon, Jan 31, 2005 at 09:50:50PM +0100, Jean Delvare wrote:
> Hi Adrian,
Hi Jean,
>...
> > -/* match always succeeds, as we want the probe() to tell if we really
> > accept this match */ -static int i2c_device_match(struct device *dev,
> > struct device_driver *drv) -{
> > - return 1;
> > -}
> > -
> > -static int i2c_bus_suspend(struct device * dev, pm_message_t state)
> > -{
> > - int rc = 0;
> > -
> > - if (dev->driver && dev->driver->suspend)
> > - rc = dev->driver->suspend(dev,state,0);
> > - return rc;
> > -}
> > -
> > -static int i2c_bus_resume(struct device * dev)
> > -{
> > - int rc = 0;
> > -
> > - if (dev->driver && dev->driver->resume)
> > - rc = dev->driver->resume(dev,0);
> > - return rc;
> > -}
> > -
> > -struct bus_type i2c_bus_type = {
> > - .name = "i2c",
> > - .match = i2c_device_match,
> > - .suspend = i2c_bus_suspend,
> > - .resume = i2c_bus_resume,
> > -};
> > -
> > static int __init i2c_init(void)
> > {
> > int retval;
>
> Is moving that code around really necessary? Looks to me like only the
> i2c_bus_type structure needs to be moved.
i2c_bus_type requires i2c_device_match, i2c_bus_suspend and
i2c_bus_resume...
> Thanks,
> Jean Delvare
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
next prev parent reply other threads:[~2005-01-31 21:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-31 18:59 [2.6 patch] i2c-core.c: make some code static Adrian Bunk
2005-01-31 20:50 ` Jean Delvare
2005-01-31 21:46 ` Adrian Bunk [this message]
2005-01-31 22:04 ` Jean Delvare
2005-02-01 8:18 ` Greg KH
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=20050131214622.GF21437@stusta.de \
--to=bunk@stusta.de \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sensors@stimpy.netroedge.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox