Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 350821
b: refs/heads/master
c: 02bbde7
h: refs/heads/master
i:
  350819: 825f4fe
v: v3
  • Loading branch information
Grant Likely committed Feb 17, 2013
1 parent 4e4ecca commit ae80680
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e570d7c15a73f88942885881a84257a65fa44c80
refs/heads/master: 02bbde7849e68e193cefaa1885fe0df0f03c9fcd
13 changes: 2 additions & 11 deletions trunk/drivers/of/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ struct platform_device *of_platform_device_create_pdata(
struct device *parent)
{
struct platform_device *dev;
int rc;

if (!of_device_is_available(np))
return NULL;
Expand All @@ -215,24 +214,16 @@ struct platform_device *of_platform_device_create_pdata(
#if defined(CONFIG_MICROBLAZE)
dev->archdata.dma_mask = 0xffffffffUL;
#endif
dev->name = dev_name(&dev->dev);
dev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
dev->dev.bus = &platform_bus_type;
dev->dev.platform_data = platform_data;
dev->dev.id = PLATFORM_DEVID_NONE;
/* device_add will assume that this device is on the same node as
* the parent. If there is no parent defined, set the node
* explicitly */
if (!parent)
set_dev_node(&dev->dev, of_node_to_nid(np));

/* We do not fill the DMA ops for platform devices by default.
* This is currently the responsibility of the platform code
* to do such, possibly using a device notifier
*/

rc = platform_device_add(dev);
if (rc) {
dev_err(&dev->dev, "device registration failed\n");
if (of_device_add(dev) != 0) {
platform_device_put(dev);
return NULL;
}
Expand Down

0 comments on commit ae80680

Please sign in to comment.