[etherlab-users] [PATCH] Allow master to work with kernels >= 2.6.27

Uwe Hermann uwe at hermann-uwe.de
Fri Mar 6 19:40:20 CET 2009


Hi,

I'm currently porting the r8169 driver to 2.6.28 (which builds fine by
now, but not sure if it works properly yet). After a few hours of
debugging I found a problem in the Ethercat master code, which is due to
an API change in the 2.6.27 kernels.

The device_create() call has received another argument in >= 2.6.27.

This is the 2.6.26 version:
extern struct device *device_create(struct class *cls, struct device *parent,
                                    dev_t devt, const char *fmt, ...)
                                    __attribute__((format(printf, 4, 5)));

This is from >= 2.6.27:
extern struct device *device_create(struct class *cls, struct device *parent,
                                    dev_t devt, void *drvdata,
                                    const char *fmt, ...)
                                    __attribute__((format(printf, 5, 6)));

Attached is a patch which should fix the issue.

I'll post more patches and test results of r8169 on 2.6.28 later next
week or so.

HTH, Uwe.
-- 
http://www.hermann-uwe.de  | http://www.holsham-traders.de
http://www.crazy-hacks.org | http://www.unmaintained-free-software.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ethercat_master_2.6.27.patch
Type: text/x-diff
Size: 793 bytes
Desc: not available
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20090306/dce0f93d/attachment-0003.patch>


More information about the Etherlab-users mailing list