Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Staging: me4000: make file_operations const

This eliminates checkpatch.pl warnings, that struct file_operations is
usually const. The structs me4000_ai_fops_array and
me4000_ao_fops_array are not modified and thus also made const.

Signed-off-by: Andre Haupt <andre@bitwigglers.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Andre Haupt and committed by
Greg Kroah-Hartman
93be73f9 f02d3345

+13 -13
+13 -13
drivers/staging/me4000/me4000.c
··· 309 309 .probe = me4000_probe 310 310 }; 311 311 312 - static struct file_operations me4000_ao_fops_sing = { 312 + static const struct file_operations me4000_ao_fops_sing = { 313 313 .owner = THIS_MODULE, 314 314 .write = me4000_ao_write_sing, 315 315 .ioctl = me4000_ao_ioctl_sing, ··· 317 317 .release = me4000_release, 318 318 }; 319 319 320 - static struct file_operations me4000_ao_fops_wrap = { 320 + static const struct file_operations me4000_ao_fops_wrap = { 321 321 .owner = THIS_MODULE, 322 322 .write = me4000_ao_write_wrap, 323 323 .ioctl = me4000_ao_ioctl_wrap, ··· 325 325 .release = me4000_release, 326 326 }; 327 327 328 - static struct file_operations me4000_ao_fops_cont = { 328 + static const struct file_operations me4000_ao_fops_cont = { 329 329 .owner = THIS_MODULE, 330 330 .write = me4000_ao_write_cont, 331 331 .poll = me4000_ao_poll_cont, ··· 335 335 .fsync = me4000_ao_fsync_cont, 336 336 }; 337 337 338 - static struct file_operations me4000_ai_fops_sing = { 338 + static const struct file_operations me4000_ai_fops_sing = { 339 339 .owner = THIS_MODULE, 340 340 .ioctl = me4000_ai_ioctl_sing, 341 341 .open = me4000_open, 342 342 .release = me4000_release, 343 343 }; 344 344 345 - static struct file_operations me4000_ai_fops_cont_sw = { 345 + static const struct file_operations me4000_ai_fops_cont_sw = { 346 346 .owner = THIS_MODULE, 347 347 .read = me4000_ai_read, 348 348 .poll = me4000_ai_poll, ··· 352 352 .fasync = me4000_ai_fasync, 353 353 }; 354 354 355 - static struct file_operations me4000_ai_fops_cont_et = { 355 + static const struct file_operations me4000_ai_fops_cont_et = { 356 356 .owner = THIS_MODULE, 357 357 .read = me4000_ai_read, 358 358 .poll = me4000_ai_poll, ··· 361 361 .release = me4000_release, 362 362 }; 363 363 364 - static struct file_operations me4000_ai_fops_cont_et_value = { 364 + static const struct file_operations me4000_ai_fops_cont_et_value = { 365 365 .owner = THIS_MODULE, 366 366 .read = me4000_ai_read, 367 367 .poll = me4000_ai_poll, ··· 370 370 .release = me4000_release, 371 371 }; 372 372 373 - static struct file_operations me4000_ai_fops_cont_et_chanlist = { 373 + static const struct file_operations me4000_ai_fops_cont_et_chanlist = { 374 374 .owner = THIS_MODULE, 375 375 .read = me4000_ai_read, 376 376 .poll = me4000_ai_poll, ··· 379 379 .release = me4000_release, 380 380 }; 381 381 382 - static struct file_operations me4000_dio_fops = { 382 + static const struct file_operations me4000_dio_fops = { 383 383 .owner = THIS_MODULE, 384 384 .ioctl = me4000_dio_ioctl, 385 385 .open = me4000_open, 386 386 .release = me4000_release, 387 387 }; 388 388 389 - static struct file_operations me4000_cnt_fops = { 389 + static const struct file_operations me4000_cnt_fops = { 390 390 .owner = THIS_MODULE, 391 391 .ioctl = me4000_cnt_ioctl, 392 392 .open = me4000_open, 393 393 .release = me4000_release, 394 394 }; 395 395 396 - static struct file_operations me4000_ext_int_fops = { 396 + static const struct file_operations me4000_ext_int_fops = { 397 397 .owner = THIS_MODULE, 398 398 .ioctl = me4000_ext_int_ioctl, 399 399 .open = me4000_open, ··· 401 401 .fasync = me4000_ext_int_fasync, 402 402 }; 403 403 404 - static struct file_operations *me4000_ao_fops_array[] = { 404 + static const struct file_operations *me4000_ao_fops_array[] = { 405 405 /* single operations */ 406 406 &me4000_ao_fops_sing, 407 407 /* wraparound operations */ ··· 410 410 &me4000_ao_fops_cont, 411 411 }; 412 412 413 - static struct file_operations *me4000_ai_fops_array[] = { 413 + static const struct file_operations *me4000_ai_fops_array[] = { 414 414 /* single operations */ 415 415 &me4000_ai_fops_sing, 416 416 /* continuous operations with software start */