* [PATCH] remove explicit k_name use in atmel_cs.c, bt3c_cs.c
@ 2004-11-10 0:59 Andries Brouwer
2004-11-10 1:15 ` Marcel Holtmann
0 siblings, 1 reply; 2+ messages in thread
From: Andries Brouwer @ 2004-11-10 0:59 UTC (permalink / raw)
To: torvalds, akpm; +Cc: linux-kernel
diff -uprN -X /linux/dontdiff a/drivers/bluetooth/bt3c_cs.c b/drivers/bluetooth/bt3c_cs.c
--- a/drivers/bluetooth/bt3c_cs.c 2004-08-26 22:05:15.000000000 +0200
+++ b/drivers/bluetooth/bt3c_cs.c 2004-11-10 01:23:01.000000000 +0100
@@ -489,13 +489,10 @@ static int bt3c_hci_ioctl(struct hci_dev
static struct device *bt3c_device(void)
{
- static char *kobj_name = "bt3c";
-
static struct device dev = {
.bus_id = "pcmcia",
};
- dev.kobj.k_name = kmalloc(strlen(kobj_name) + 1, GFP_KERNEL);
- strcpy(dev.kobj.k_name, kobj_name);
+ kobject_set_name(&dev.kobj, "bt3c");
kobject_init(&dev.kobj);
return &dev;
diff -uprN -X /linux/dontdiff a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c
--- a/drivers/net/wireless/atmel_cs.c 2004-08-26 22:05:25.000000000 +0200
+++ b/drivers/net/wireless/atmel_cs.c 2004-11-10 01:20:55.000000000 +0100
@@ -350,13 +350,10 @@ static struct {
/* This is strictly temporary, until PCMCIA devices get integrated into the device model. */
static struct device *atmel_device(void)
{
- static char *kobj_name = "atmel_cs";
-
static struct device dev = {
.bus_id = "pcmcia",
};
- dev.kobj.k_name = kmalloc(strlen(kobj_name)+1, GFP_KERNEL);
- strcpy(dev.kobj.k_name, kobj_name);
+ kobject_set_name(&dev.kobj, "atmel_cs");
kobject_init(&dev.kobj);
return &dev;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] remove explicit k_name use in atmel_cs.c, bt3c_cs.c
2004-11-10 0:59 [PATCH] remove explicit k_name use in atmel_cs.c, bt3c_cs.c Andries Brouwer
@ 2004-11-10 1:15 ` Marcel Holtmann
0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2004-11-10 1:15 UTC (permalink / raw)
To: Andries Brouwer; +Cc: Linus Torvalds, Andrew Morton, Linux Kernel Mailing List
> diff -uprN -X /linux/dontdiff a/drivers/bluetooth/bt3c_cs.c b/drivers/bluetooth/bt3c_cs.c
> --- a/drivers/bluetooth/bt3c_cs.c 2004-08-26 22:05:15.000000000 +0200
> +++ b/drivers/bluetooth/bt3c_cs.c 2004-11-10 01:23:01.000000000 +0100
> @@ -489,13 +489,10 @@ static int bt3c_hci_ioctl(struct hci_dev
>
> static struct device *bt3c_device(void)
> {
> - static char *kobj_name = "bt3c";
> -
> static struct device dev = {
> .bus_id = "pcmcia",
> };
> - dev.kobj.k_name = kmalloc(strlen(kobj_name) + 1, GFP_KERNEL);
> - strcpy(dev.kobj.k_name, kobj_name);
> + kobject_set_name(&dev.kobj, "bt3c");
> kobject_init(&dev.kobj);
>
> return &dev;
The part for the bt3c_cs driver is fine with me and I have no problem if
Andrew picks this up and sends it to Linus for final inclusion. Once the
PCMCIA subsystem if fully integrated into the device model this will go
away anyway.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-11-10 1:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-10 0:59 [PATCH] remove explicit k_name use in atmel_cs.c, bt3c_cs.c Andries Brouwer
2004-11-10 1:15 ` Marcel Holtmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.