Merge commit 'refs/top-bases/linux-zfs-branch' into linux-zfs-branch

This commit is contained in:
Brian Behlendorf 2009-10-02 16:35:42 -07:00
commit 950031dbd2
1 changed files with 3 additions and 5 deletions

View File

@ -1223,6 +1223,7 @@ static loff_t zpios_seek(struct file *file, loff_t offset, int origin)
return rc;
}
static struct cdev zpios_cdev;
static struct file_operations zpios_fops = {
.owner = THIS_MODULE,
.open = zpios_open,
@ -1236,11 +1237,6 @@ static struct file_operations zpios_fops = {
.llseek = zpios_seek,
};
static struct cdev zpios_cdev = {
.owner = THIS_MODULE,
.kobj = { .name = ZPIOS_NAME, },
};
static int
zpios_init(void)
{
@ -1253,6 +1249,8 @@ zpios_init(void)
/* Support for registering a character driver */
cdev_init(&zpios_cdev, &zpios_fops);
zpios_cdev.owner = THIS_MODULE;
kobject_set_name(&zpios_cdev.kobj, ZPIOS_NAME);
if ((rc = cdev_add(&zpios_cdev, dev, ZPIOS_MINORS))) {
printk(KERN_ERR "ZPIOS: Error adding cdev, %d\n", rc);
kobject_put(&zpios_cdev.kobj);