Skip to content

Commit

Permalink
Staging: ipack: Make ipack_driver_ops const.
Browse files Browse the repository at this point in the history
Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Jens Taprogge authored and Greg Kroah-Hartman committed Sep 4, 2012
1 parent 7db5e3c commit e801113
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions drivers/staging/ipack/devices/ipoctal.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#define IP_OCTAL_ID_SPACE_VECTOR 0x41
#define IP_OCTAL_NB_BLOCKS 4

static struct ipack_driver driver;
static const struct tty_operations ipoctal_fops;

struct ipoctal {
Expand Down Expand Up @@ -846,15 +845,18 @@ static void ipoctal_remove(struct ipack_device *device)
}
}

static struct ipack_driver_ops ipoctal_drv_ops = {
static const struct ipack_driver_ops ipoctal_drv_ops = {
.match = ipoctal_match,
.probe = ipoctal_probe,
.remove = ipoctal_remove,
};

static struct ipack_driver driver = {
.ops = &ipoctal_drv_ops,
};

static int __init ipoctal_init(void)
{
driver.ops = &ipoctal_drv_ops;
return ipack_driver_register(&driver, THIS_MODULE, KBUILD_MODNAME);
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/ipack/ipack.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ struct ipack_driver_ops {
struct ipack_driver {
struct device_driver driver;
const struct ipack_device_id *id_table;
struct ipack_driver_ops *ops;
const struct ipack_driver_ops *ops;
};

/**
Expand Down

0 comments on commit e801113

Please sign in to comment.