[i2c] [patch 2.6.21-rc3-git +i2c] i2c EXPORT_SYMBOL cleanup

David Brownell david-b at pacbell.net
Fri Mar 9 17:02:26 CET 2007


On Friday 09 March 2007 6:13 am, Jean Delvare wrote:

> > +EXPORT_SYMBOL_GPL(i2c_bus_type);
> 
> Any reason why this one doesn't have its "/* exported to i2c-isa */"
> comment?

Yes.  The bus_type symbols are generally exported, so that
it's easy to answer questions like "is this an I2C device?"

> >  /**
> >   * i2c_new_device - instantiate an i2c device for use with a new style driver
> > @@ -293,6 +294,7 @@ void i2c_adapter_dev_release(struct devi
> >  	struct i2c_adapter *adap = to_i2c_adapter(dev);
> >  	complete(&adap->dev_released);
> >  }
> > +EXPORT_SYMBOL_GPL(i2c_adapter_dev_release);	/* exported to i2c-isa */
> >  
> >  static ssize_t
> >  show_adapter_name(struct device *dev, struct device_attribute *attr, char *buf)
> > @@ -311,6 +313,7 @@ struct class i2c_adapter_class = {
> >  	.name			= "i2c-adapter",
> >  	.dev_attrs		= i2c_adapter_attrs,
> >  };
> > +EXPORT_SYMBOL_GPL(i2c_adapter_class);		/* exported to i2c-isa */
> 
> BTW, I think I'll move the declarations of these
> exported-to-i2c-isa-only symbols from i2c.h to i2c-isa.c itself. Best
> way to make sure nobody gets tempted to use them. Hopefully we'll
> remove the exports themselves soon anyway.

One of these days your battle against i2c-isa will be over!!

- Dave




More information about the i2c mailing list