On Mon, Dec 05, 2005 at 09:23:37PM +0100, Jean Delvare wrote:
> The name parameter of platform_device_register_simple should be of
> type const char * instead of char *, as we simply pass it to
> platform_device_alloc, where it has type const char *.
>
> Signed-off-by: Jean Delvare <[email protected]>
Acked-by: Russell King <[email protected]>
However, I've been wondering whether we want to keep this "simple"
interface around long-term given that we now have a more flexible
platform device allocation interface - I don't particularly like
having superfluous interfaces for folk to get confused with.
---
drivers/base/platform.c | 2 +-
include/linux/platform_device.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--- linux-2.6.15-rc2.orig/drivers/base/platform.c 2005-11-13 21:02:31.000000000 +0100
+++ linux-2.6.15-rc2/drivers/base/platform.c 2005-12-05 20:44:43.000000000 +0100
@@ -327,7 +327,7 @@
* to be unloaded iwithout waiting for the last reference to the device
* to be dropped.
*/
-struct platform_device *platform_device_register_simple(char *name, unsigned int id,
+struct platform_device *platform_device_register_simple(const char *name, unsigned int id,
struct resource *res, unsigned int num)
{
struct platform_device *pdev;
--- linux-2.6.15-rc2.orig/include/linux/platform_device.h 2005-11-13 21:02:59.000000000 +0100
+++ linux-2.6.15-rc2/include/linux/platform_device.h 2005-12-05 20:44:30.000000000 +0100
@@ -35,7 +35,7 @@
extern int platform_get_irq_byname(struct platform_device *, char *);
extern int platform_add_devices(struct platform_device **, int);
-extern struct platform_device *platform_device_register_simple(char *, unsigned int, struct resource *, unsigned int);
+extern struct platform_device *platform_device_register_simple(const char *, unsigned int, struct resource *, unsigned int);
extern struct platform_device *platform_device_alloc(const char *name, unsigned int id);
extern int platform_device_add_resources(struct platform_device *pdev, struct resource *res, unsigned int num);
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]