From: Albert H. <he...@us...> - 2009-10-25 18:50:42
|
Update of /cvsroot/gc-linux/linux/drivers/exi In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv31074/drivers/exi Modified Files: exi-driver.c Log Message: Merge gc-linux-v2.6.30. Index: exi-driver.c =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/exi/exi-driver.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** exi-driver.c 28 Mar 2009 20:44:19 -0000 1.19 --- exi-driver.c 25 Oct 2009 18:50:27 -0000 1.20 *************** *** 21,24 **** --- 21,25 ---- #include <linux/module.h> #include <linux/of_platform.h> + #include <linux/dma-mapping.h> #define DRV_MODULE_NAME "exi" *************** *** 52,68 **** static struct device exi_bus_devices[EXI_MAX_CHANNELS] = { [0] = { ! .bus_id = "exi0", .release = exi_bus_device_release, - .parent = NULL }, [1] = { ! .bus_id = "exi1", .release = exi_bus_device_release, - .parent = NULL }, [2] = { ! .bus_id = "exi2", .release = exi_bus_device_release, - .parent = NULL }, }; --- 53,66 ---- static struct device exi_bus_devices[EXI_MAX_CHANNELS] = { [0] = { ! .init_name = "exi0", .release = exi_bus_device_release, }, [1] = { ! .init_name = "exi1", .release = exi_bus_device_release, }, [2] = { ! .init_name = "exi2", .release = exi_bus_device_release, }, }; *************** *** 179,189 **** exi_device->eid.device = device; exi_device->frequency = EXI_FREQ_SCAN; - exi_device->exi_channel = to_exi_channel(channel); exi_device->dev.parent = &exi_bus_devices[channel]; exi_device->dev.bus = &exi_bus_type; ! sprintf(exi_device->dev.bus_id, "exi%01x:%01x", channel, device); exi_device->dev.platform_data = to_exi_channel(channel); exi_device->dev.release = exi_device_release; } --- 177,187 ---- exi_device->eid.device = device; exi_device->frequency = EXI_FREQ_SCAN; exi_device->exi_channel = to_exi_channel(channel); exi_device->dev.parent = &exi_bus_devices[channel]; exi_device->dev.bus = &exi_bus_type; ! dev_set_name(&exi_device->dev, "exi%01x:%01x", channel, device); exi_device->dev.platform_data = to_exi_channel(channel); + set_dma_ops(&exi_device->dev, &dma_direct_ops); exi_device->dev.release = exi_device_release; } *************** *** 332,336 **** /* device removed or changed */ drv_printk(KERN_INFO, "about to remove [%s] id=0x%08x %s\n", ! exi_device->dev.bus_id, exi_device->eid.id, exi_name_id(exi_device->eid.id)); --- 330,334 ---- /* device removed or changed */ drv_printk(KERN_INFO, "about to remove [%s] id=0x%08x %s\n", ! dev_name(&exi_device->dev), exi_device->eid.id, exi_name_id(exi_device->eid.id)); *************** *** 343,347 **** /* a new device has been found */ drv_printk(KERN_INFO, "about to add [%s] id=0x%08x %s\n", ! exi_device->dev.bus_id, id, exi_name_id(id)); exi_device->eid.id = id; --- 341,345 ---- /* a new device has been found */ drv_printk(KERN_INFO, "about to add [%s] id=0x%08x %s\n", ! dev_name(&exi_device->dev), id, exi_name_id(id)); exi_device->eid.id = id; *************** *** 446,449 **** --- 444,454 ---- goto err_hw_init; + /* register root devices */ + for (channel = 0; channel < EXI_MAX_CHANNELS; ++channel) { + retval = device_register(&exi_bus_devices[channel]); + if (retval) + goto err_device_register; + } + /* initialize devices */ for (channel = 0; channel < EXI_MAX_CHANNELS; ++channel) { *************** *** 455,465 **** } - /* register root devices */ - for (channel = 0; channel < EXI_MAX_CHANNELS; ++channel) { - retval = device_register(&exi_bus_devices[channel]); - if (retval) - goto err_device_register; - } - /* register the bus */ retval = bus_register(&exi_bus_type); --- 460,463 ---- |