summaryrefslogtreecommitdiff
path: root/drivers/bus
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/bus')
-rw-r--r--drivers/bus/mvebu-mbus.c8
-rw-r--r--drivers/bus/omap-ocp2scp.c60
2 files changed, 5 insertions, 63 deletions
diff --git a/drivers/bus/mvebu-mbus.c b/drivers/bus/mvebu-mbus.c
index 8740f46b4d0d..33c6947eebec 100644
--- a/drivers/bus/mvebu-mbus.c
+++ b/drivers/bus/mvebu-mbus.c
@@ -49,6 +49,8 @@
* configuration (file 'devices').
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
@@ -762,7 +764,7 @@ int mvebu_mbus_add_window_remap_flags(const char *devname, phys_addr_t base,
break;
if (!s->soc->map[i].name) {
- pr_err("mvebu-mbus: unknown device '%s'\n", devname);
+ pr_err("unknown device '%s'\n", devname);
return -ENODEV;
}
@@ -775,7 +777,7 @@ int mvebu_mbus_add_window_remap_flags(const char *devname, phys_addr_t base,
attr |= 0x28;
if (!mvebu_mbus_window_conflicts(s, base, size, target, attr)) {
- pr_err("mvebu-mbus: cannot add window '%s', conflicts with another window\n",
+ pr_err("cannot add window '%s', conflicts with another window\n",
devname);
return -EINVAL;
}
@@ -842,7 +844,7 @@ int __init mvebu_mbus_init(const char *soc, phys_addr_t mbuswins_phys_base,
break;
if (!of_id->compatible) {
- pr_err("mvebu-mbus: could not find a matching SoC family\n");
+ pr_err("could not find a matching SoC family\n");
return -ENODEV;
}
diff --git a/drivers/bus/omap-ocp2scp.c b/drivers/bus/omap-ocp2scp.c
index fe7191663bbd..5511f9814ddd 100644
--- a/drivers/bus/omap-ocp2scp.c
+++ b/drivers/bus/omap-ocp2scp.c
@@ -22,26 +22,6 @@
#include <linux/pm_runtime.h>
#include <linux/of.h>
#include <linux/of_platform.h>
-#include <linux/platform_data/omap_ocp2scp.h>
-
-/**
- * _count_resources - count for the number of resources
- * @res: struct resource *
- *
- * Count and return the number of resources populated for the device that is
- * connected to ocp2scp.
- */
-static unsigned _count_resources(struct resource *res)
-{
- int cnt = 0;
-
- while (res->start != res->end) {
- cnt++;
- res++;
- }
-
- return cnt;
-}
static int ocp2scp_remove_devices(struct device *dev, void *c)
{
@@ -55,11 +35,7 @@ static int ocp2scp_remove_devices(struct device *dev, void *c)
static int omap_ocp2scp_probe(struct platform_device *pdev)
{
int ret;
- unsigned res_cnt, i;
struct device_node *np = pdev->dev.of_node;
- struct platform_device *pdev_child;
- struct omap_ocp2scp_platform_data *pdata = pdev->dev.platform_data;
- struct omap_ocp2scp_dev *dev;
if (np) {
ret = of_platform_populate(np, NULL, NULL, &pdev->dev);
@@ -68,48 +44,12 @@ static int omap_ocp2scp_probe(struct platform_device *pdev)
"failed to add resources for ocp2scp child\n");
goto err0;
}
- } else if (pdata) {
- for (i = 0, dev = *pdata->devices; i < pdata->dev_cnt; i++,
- dev++) {
- res_cnt = _count_resources(dev->res);
-
- pdev_child = platform_device_alloc(dev->drv_name,
- PLATFORM_DEVID_AUTO);
- if (!pdev_child) {
- dev_err(&pdev->dev,
- "failed to allocate mem for ocp2scp child\n");
- goto err0;
- }
-
- ret = platform_device_add_resources(pdev_child,
- dev->res, res_cnt);
- if (ret) {
- dev_err(&pdev->dev,
- "failed to add resources for ocp2scp child\n");
- goto err1;
- }
-
- pdev_child->dev.parent = &pdev->dev;
-
- ret = platform_device_add(pdev_child);
- if (ret) {
- dev_err(&pdev->dev,
- "failed to register ocp2scp child device\n");
- goto err1;
- }
- }
- } else {
- dev_err(&pdev->dev, "OCP2SCP initialized without plat data\n");
- return -EINVAL;
}
pm_runtime_enable(&pdev->dev);
return 0;
-err1:
- platform_device_put(pdev_child);
-
err0:
device_for_each_child(&pdev->dev, NULL, ocp2scp_remove_devices);