• David Brownell's avatar
    ARM: OMAP: fix omap i2c init (regression) · cfa9a63a
    David Brownell authored
    In mainline, the "old style" I2C registration was only removed for
    OMAP2, leading to init-time bugs (regressions) like:
    
        sysfs: duplicate filename 'i2c_omap.1' can not be created
        ------------[ cut here ]------------
        WARNING: at fs/sysfs/dir.c:424 sysfs_add_one+0x40/0xd4()
        Modules linked in:
        	... deletia ...
        [<c0036a38>] (omap_init_i2c+0x0/0x50) from [<c000cea8>] (omap_init_devices+0x10/0x24)
         r4:c001e000
        [<c000ce98>] (omap_init_devices+0x0/0x24) from [<c0008684>] (do_initcalls+0x78/0x200)
        	... deletia ...
        ---[ end trace ca143223eefdc828 ]---
        kobject_add_internal failed for i2c_omap.1 with -EEXIST, don't try to register things with the same name in the same directory.
    
    The fix is obvious:  remove the old init code, it's no longer needed.
    Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
    Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
    cfa9a63a
devices.c 11.1 KB