lkml.org 
[lkml]   [2005]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [2.6 patch] i2c-core.c: make some code static
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

-
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/

\
 
 \ /
  Last update: 2005-03-22 14:10    [W:2.264 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site