|
@@ -125,9 +125,15 @@ static int mfd_add_device(struct device *parent, int id,
|
|
struct platform_device *pdev;
|
|
struct platform_device *pdev;
|
|
struct device_node *np = NULL;
|
|
struct device_node *np = NULL;
|
|
int ret = -ENOMEM;
|
|
int ret = -ENOMEM;
|
|
|
|
+ int platform_id;
|
|
int r;
|
|
int r;
|
|
|
|
|
|
- pdev = platform_device_alloc(cell->name, id + cell->id);
|
|
|
|
|
|
+ if (id < 0)
|
|
|
|
+ platform_id = id;
|
|
|
|
+ else
|
|
|
|
+ platform_id = id + cell->id;
|
|
|
|
+
|
|
|
|
+ pdev = platform_device_alloc(cell->name, platform_id);
|
|
if (!pdev)
|
|
if (!pdev)
|
|
goto fail_alloc;
|
|
goto fail_alloc;
|
|
|
|
|