2009/12/10 LKomz Komz <lkomz101@xxxxxxxxx>: > > Are there any documentation on what the changes in the i2c modules are going > from 2.6.22 to 2.6.31. > The driver which compiles and runs on 2.6.22 returns the following errors > when compiled on 2.6.31. > I have included the correspondign lies from the code to clarify my > predicament. Due to the current urgency I am sticking to the old binding > method as the new method requires more indepth understanding. Are there ways > to get over the following messages? > > error: unknown field ‘detach_client’ specified in initializer > > device_create(lkmoz_class,NULL,lkomz_dev_number, LKOMZ_DEV_NAME) > =>error: too few arguments to function ‘device_create’ > kernel 32: struct device *device_create(struct class *class, struct device *parent, 1480 dev_t devt, void *drvdata, const char *fmt, ...) kernel 22: struct device *device_create(struct class *class, struct device *parent, 1165 dev_t devt, const char *fmt, ...) Error message told us parameter changed. Many thousands people contribute for the kernel community and the documents always are the old fashions. The code changes everyday, and i think that's the charm of the linux kernel. Everyday it's the same but everything is changed. > i2c_probe(adapter,&lkomz_addr_data,lkomz_attach) > =>error: implicit declaration of function ‘i2c_probe’ > > i2c_detach_client(client) > =>error: implicit declaration of function ‘i2c_detach_client’ > > make[1]: Leaving directory `/usr/src/kernels/linux-2.6.31' > make: *** [all] Error 2 > > > Any help would be greatly appreciaetd. > > Thanking you. > > L Komz. > > > On Fri, Dec 4, 2009 at 10:19 PM, Greg KH <greg@xxxxxxxxx> wrote: >> >> On Fri, Dec 04, 2009 at 02:29:36PM -0600, LKomz Komz wrote: >> > Thanks Greg for the reply! >> > >> > I have an i2c driver written using the attach method for binding. It >> > opens >> > the device and reads the registers etc. >> > >> > The following document talks about another binding method. >> > http://www.kernel.org/doc/Documentation/i2c/upgrading-clients >> > >> > Could you clarify that whether the new binding method is the way to go >> > for >> > i2c devices. >> >> Yes, why would the document lie? >> >> > Do I have to rewrite the current driver to make it compatible with >> > future kernel versions.? >> >> Yes. >> >> The best thing for you to do is get it into the main kernel tree, then >> it will remain compatible with future kernel versions as the API changes >> over time. >> >> thanks, >> >> greg k-h > > -- Best Regards Lin -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ