From: Andries Brouwer <Andries.Brouwer@cwi.nl>
To: torvalds@osdl.org, akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] remove explicit k_name use in atmel_cs.c, bt3c_cs.c
Date: Wed, 10 Nov 2004 01:59:43 +0100 [thread overview]
Message-ID: <20041110005941.GA9336@apps.cwi.nl> (raw)
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;
next reply other threads:[~2004-11-10 0:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-10 0:59 Andries Brouwer [this message]
2004-11-10 1:15 ` [PATCH] remove explicit k_name use in atmel_cs.c, bt3c_cs.c Marcel Holtmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041110005941.GA9336@apps.cwi.nl \
--to=andries.brouwer@cwi.nl \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.