Skip to content

Commit

Permalink
cdev: remove unneeded setting of cdev names
Browse files Browse the repository at this point in the history
struct cdev does not need the kobject name to be set, as it is never
used.  This patch fixes up the few places it is set.


Signed-off-by: Greg Kroah-Hartman <[email protected]>
Acked-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
gregkh committed Oct 12, 2007
1 parent 19c38de commit 7e7654a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 16 deletions.
5 changes: 1 addition & 4 deletions block/bsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1010,10 +1010,7 @@ int bsg_register_queue(struct request_queue *q, struct device *gdev,
}
EXPORT_SYMBOL_GPL(bsg_register_queue);

static struct cdev bsg_cdev = {
.kobj = {.name = "bsg", },
.owner = THIS_MODULE,
};
static struct cdev bsg_cdev;

static int __init bsg_init(void)
{
Expand Down
5 changes: 1 addition & 4 deletions drivers/char/raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,7 @@ static const struct file_operations raw_ctl_fops = {
.owner = THIS_MODULE,
};

static struct cdev raw_cdev = {
.kobj = {.name = "raw", },
.owner = THIS_MODULE,
};
static struct cdev raw_cdev;

static int __init raw_init(void)
{
Expand Down
5 changes: 1 addition & 4 deletions drivers/media/dvb/dvb-core/dvbdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,7 @@ static struct file_operations dvb_device_fops =
.open = dvb_device_open,
};

static struct cdev dvb_device_cdev = {
.kobj = {.name = "dvb", },
.owner = THIS_MODULE,
};
static struct cdev dvb_device_cdev;

int dvb_generic_open(struct inode *inode, struct file *file)
{
Expand Down
6 changes: 2 additions & 4 deletions drivers/usb/core/devio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1576,6 +1576,7 @@ static unsigned int usbdev_poll(struct file *file, struct poll_table_struct *wai
}

const struct file_operations usbdev_file_operations = {
.owner = THIS_MODULE,
.llseek = usbdev_lseek,
.read = usbdev_read,
.poll = usbdev_poll,
Expand Down Expand Up @@ -1625,10 +1626,7 @@ static struct notifier_block usbdev_nb = {
};
#endif

static struct cdev usb_device_cdev = {
.kobj = {.name = "usb_device", },
.owner = THIS_MODULE,
};
static struct cdev usb_device_cdev;

int __init usb_devio_init(void)
{
Expand Down

0 comments on commit 7e7654a

Please sign in to comment.