summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorTom Cherry <tomcherry@google.com>2015-04-23 14:35:33 -0700
committerTom Cherry <tomcherry@google.com>2015-04-23 15:04:06 -0700
commit1225a61f0aec6bff340e84ac05bd77ba39151884 (patch)
tree60254ba415928bd4f429cb753d246bc77a9a4eb0 /init
parent2ce1d81fd412657c14a14dd43ec570ac65cc1874 (diff)
downloadcore-1225a61f0aec6bff340e84ac05bd77ba39151884.tar.gz
core-1225a61f0aec6bff340e84ac05bd77ba39151884.tar.bz2
core-1225a61f0aec6bff340e84ac05bd77ba39151884.zip
init: consider all platform devices for find_platform_device
Certain platforms list their platform devices with a path other than the current /devices or /devices/platform. Additionally, sometimes these paths are a platform device themselves. An example are devices with a path /devices/soc.0/... where /devices/soc.0 is also a platform devices. Instead of continuing to special case these path prefixes, we can consider the entire path, given that no mmc or usb devices create platform devices as subdevices, which they should not by their very nature. This keeps the symlinks for block devices named identically for current platform devices and places them in /dev/block/<full path to device> for devices in locations other than /devices or /devices/platform, eg /dev/block/platform/soc.0/7824900.sdhci This keeps the symlinks for character deviced named identically for all cases. Change-Id: Ifc8eedf1086db1826dbc8f7e96cdfcfa5da876b3
Diffstat (limited to 'init')
-rw-r--r--init/devices.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/init/devices.cpp b/init/devices.cpp
index 96b1696b4..2c7f5a9cd 100644
--- a/init/devices.cpp
+++ b/init/devices.cpp
@@ -266,7 +266,6 @@ static void make_device(const char *path,
static void add_platform_device(const char *path)
{
int path_len = strlen(path);
- struct listnode *node;
struct platform_node *bus;
const char *name = path;
@@ -276,15 +275,6 @@ static void add_platform_device(const char *path)
name += 9;
}
- list_for_each_reverse(node, &platform_names) {
- bus = node_to_item(node, struct platform_node, list);
- if ((bus->path_len < path_len) &&
- (path[bus->path_len] == '/') &&
- !strncmp(path, bus->path, bus->path_len))
- /* subdevice of an existing platform, ignore it */
- return;
- }
-
INFO("adding platform device %s (%s)\n", name, path);
bus = (platform_node*) calloc(1, sizeof(struct platform_node));