Commit d1eba2a7 authored by Andries E. Brouwer's avatar Andries E. Brouwer Committed by Linus Torvalds

[PATCH] remove explicit k_name use in atmel_cs.c, bt3c_cs.c

parent 8f0816db
...@@ -490,13 +490,10 @@ static int bt3c_hci_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned long ...@@ -490,13 +490,10 @@ static int bt3c_hci_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned long
static struct device *bt3c_device(void) static struct device *bt3c_device(void)
{ {
static char *kobj_name = "bt3c";
static struct device dev = { static struct device dev = {
.bus_id = "pcmcia", .bus_id = "pcmcia",
}; };
dev.kobj.k_name = kmalloc(strlen(kobj_name) + 1, GFP_KERNEL); kobject_set_name(&dev.kobj, "bt3c");
strcpy(dev.kobj.k_name, kobj_name);
kobject_init(&dev.kobj); kobject_init(&dev.kobj);
return &dev; return &dev;
......
...@@ -350,13 +350,10 @@ static struct { ...@@ -350,13 +350,10 @@ static struct {
/* This is strictly temporary, until PCMCIA devices get integrated into the device model. */ /* This is strictly temporary, until PCMCIA devices get integrated into the device model. */
static struct device *atmel_device(void) static struct device *atmel_device(void)
{ {
static char *kobj_name = "atmel_cs";
static struct device dev = { static struct device dev = {
.bus_id = "pcmcia", .bus_id = "pcmcia",
}; };
dev.kobj.k_name = kmalloc(strlen(kobj_name)+1, GFP_KERNEL); kobject_set_name(&dev.kobj, "atmel_cs");
strcpy(dev.kobj.k_name, kobj_name);
kobject_init(&dev.kobj); kobject_init(&dev.kobj);
return &dev; return &dev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment