Staging: b3dfg: remove check for pci bus master
[safe/jmp/linux-2.6] / drivers / mfd / mfd-core.c
index 6c0d1be..ae15e49 100644 (file)
@@ -25,7 +25,7 @@ static int mfd_add_device(struct device *parent, int id,
        int ret = -ENOMEM;
        int r;
 
-       pdev = platform_device_alloc(cell->name, id);
+       pdev = platform_device_alloc(cell->name, id + cell->id);
        if (!pdev)
                goto fail_alloc;
 
@@ -34,6 +34,7 @@ static int mfd_add_device(struct device *parent, int id,
                goto fail_device;
 
        pdev->dev.parent = parent;
+       platform_set_drvdata(pdev, cell->driver_data);
 
        ret = platform_device_add_data(pdev,
                        cell->platform_data, cell->data_size);