From: Jens Taprogge Date: Tue, 4 Sep 2012 15:01:17 +0000 (+0200) Subject: Staging: ipack: Make ipack_driver_ops const. X-Git-Tag: firefly_0821_release~3680^2~1977^2~696 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e80111354ac95cd0453e12caf9044938b7a78137;p=firefly-linux-kernel-4.4.55.git Staging: ipack: Make ipack_driver_ops const. Signed-off-by: Jens Taprogge Signed-off-by: Samuel Iglesias Gonsálvez Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/ipack/devices/ipoctal.c b/drivers/staging/ipack/devices/ipoctal.c index ed088649965d..7e1e6f70560d 100644 --- a/drivers/staging/ipack/devices/ipoctal.c +++ b/drivers/staging/ipack/devices/ipoctal.c @@ -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 { @@ -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); } diff --git a/drivers/staging/ipack/ipack.h b/drivers/staging/ipack/ipack.h index a3cd55982527..e6e38e7dd9f1 100644 --- a/drivers/staging/ipack/ipack.h +++ b/drivers/staging/ipack/ipack.h @@ -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; }; /**