aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/kpc2000
diff options
context:
space:
mode:
authorVandana BN <bnvandana@gmail.com>2019-05-13 19:13:27 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-20 07:40:40 +0200
commitd34141ebd7e74cc4e68fe58b2d30eb5dcf1e7aeb (patch)
tree7d1229c18d9e295fe8bc53ce405125c65dd818d3 /drivers/staging/kpc2000
parentStaging: kpc2000: kpc_dma: Resolve warning to use __func__ insted of funtion name reported by checkpatch. (diff)
downloadlinux-dev-d34141ebd7e74cc4e68fe58b2d30eb5dcf1e7aeb.tar.xz
linux-dev-d34141ebd7e74cc4e68fe58b2d30eb5dcf1e7aeb.zip
Staging: kpc2000: kpc_dma: Resolve cast warning and use const for file_operation
This Patch resolves unnecessary cast warning and const file_operations reported by checkpath.pl WARNING: unnecessary cast may hide bugs WARNING: struct file_operations should normally be const Signed-off-by: Vandana BN <bnvandana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/kpc2000')
-rw-r--r--drivers/staging/kpc2000/kpc_dma/fileops.c2
-rw-r--r--drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/kpc2000/kpc_dma/fileops.c b/drivers/staging/kpc2000/kpc_dma/fileops.c
index a3d0232eb507..254fee593399 100644
--- a/drivers/staging/kpc2000/kpc_dma/fileops.c
+++ b/drivers/staging/kpc2000/kpc_dma/fileops.c
@@ -418,7 +418,7 @@ long kpc_dma_ioctl(struct file *filp, unsigned int ioctl_num, unsigned long ioc
return -ENOTTY;
}
-struct file_operations kpc_dma_fops = {
+const struct file_operations kpc_dma_fops = {
.owner = THIS_MODULE,
.open = kpc_dma_open,
.release = kpc_dma_close,
diff --git a/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.h b/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.h
index cf781940ac1b..ee47f43e71cf 100644
--- a/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.h
+++ b/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.h
@@ -57,7 +57,7 @@ struct dev_private_data {
struct kpc_dma_device *kpc_dma_lookup_device(int minor);
-extern struct file_operations kpc_dma_fops;
+extern const struct file_operations kpc_dma_fops;
#define ENG_CAP_PRESENT 0x00000001
#define ENG_CAP_DIRECTION 0x00000002