Skip to contentSkip to conversation

remove of_platform_device_create

PATCH In review Stephen Rothwell 2 participants 2 messages Jan 16, 2008 SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 remove of_platform_device_create

There are no callers of this on the Sparc platforms.

---
 arch/sparc/kernel/of_device.c     |   27 ---------------------------
 arch/sparc64/kernel/of_device.c   |   26 --------------------------
 include/asm-sparc/of_platform.h   |    5 -----
 include/asm-sparc64/of_platform.h |    5 -----
 4 files changed, 0 insertions(+), 63 deletions(-)

Resent because the sparc-linux list did not like the addressing on the previous email.

arch/sparc/kernel/of_device.c +0 -27
index 3ea000d..cc4c235 100644
@@ -584,30 +584,3 @@ static int __init of_debug(char *str)
 }
 
 __setup("of_debug=", of_debug);
-
-struct of_device* of_platform_device_create(struct device_node *np,
-					    const char *bus_id,
-					    struct device *parent,
-					    struct bus_type *bus)
-{
-	struct of_device *dev;
-
-	dev = kzalloc(sizeof(*dev), GFP_KERNEL);
-	if (!dev)
-		return NULL;
-
-	dev->dev.parent = parent;
-	dev->dev.bus = bus;
-	dev->dev.release = of_release_dev;
-
-	strlcpy(dev->dev.bus_id, bus_id, BUS_ID_SIZE);
-
-	if (of_device_register(dev) != 0) {
-		kfree(dev);
-		return NULL;
-	}
-
-	return dev;
-}
-
-EXPORT_SYMBOL(of_platform_device_create);
arch/sparc64/kernel/of_device.c +0 -26
index fc5c0cc..0fd9db9 100644
@@ -868,29 +868,3 @@ static int __init of_debug(char *str)
 }
 
 __setup("of_debug=", of_debug);
-
-struct of_device* of_platform_device_create(struct device_node *np,
-					    const char *bus_id,
-					    struct device *parent,
-					    struct bus_type *bus)
-{
-	struct of_device *dev;
-
-	dev = kzalloc(sizeof(*dev), GFP_KERNEL);
-	if (!dev)
-		return NULL;
-
-	dev->dev.parent = parent;
-	dev->dev.bus = bus;
-	dev->dev.release = of_release_dev;
-
-	strlcpy(dev->dev.bus_id, bus_id, BUS_ID_SIZE);
-
-	if (of_device_register(dev) != 0) {
-		kfree(dev);
-		return NULL;
-	}
-
-	return dev;
-}
-EXPORT_SYMBOL(of_platform_device_create);
include/asm-sparc/of_platform.h +0 -5
index d638737..3833435 100644
@@ -21,9 +21,4 @@ extern struct bus_type sbus_bus_type;
 
 #define of_bus_type	of_platform_bus_type	/* for compatibility */
 
-extern struct of_device *of_platform_device_create(struct device_node *np,
-						   const char *bus_id,
-						   struct device *parent,
-						   struct bus_type *bus);
-
 #endif	/* _ASM_SPARC_OF_PLATFORM_H */
include/asm-sparc64/of_platform.h +0 -5
index f15cfa7..78aa032 100644
@@ -22,9 +22,4 @@ extern struct bus_type sbus_bus_type;
 
 #define of_bus_type	of_platform_bus_type	/* for compatibility */
 
-extern struct of_device *of_platform_device_create(struct device_node *np,
-						   const char *bus_id,
-						   struct device *parent,
-						   struct bus_type *bus);
-
 #endif	/* _ASM_SPARC64_OF_PLATFORM_H */
Signature · 5 lines
1.5.3.8

-- 
Cheers,
Stephen Rothwell                    [email protected]