qcacmn: proc_create_data support for 5.6+ kernel

One parameter of proc_create_data is changed from struct
file_operations to struct proc_ops.
Add support for it under the kernel version compilation flag.

Change-Id: Ic87222f9c267debef56dcc66fc629854058ffabd
CRs-Fixed: 2666492
This commit is contained in:
bings
2020-04-17 16:13:47 +08:00
gecommit door nshrivas
bovenliggende 1740435d49
commit e3fe6fc3c0
2 gewijzigde bestanden met toevoegingen van 16 en 1 verwijderingen

Bestand weergeven

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
* Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -76,11 +76,19 @@ static int pktlog_release(struct inode *i, struct file *f);
static ssize_t pktlog_read(struct file *file, char *buf, size_t nbytes,
loff_t *ppos);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0))
static const struct proc_ops pktlog_fops = {
.proc_open = pktlog_open,
.proc_release = pktlog_release,
.proc_read = pktlog_read,
};
#else
static struct file_operations pktlog_fops = {
open: pktlog_open,
release:pktlog_release,
read : pktlog_read,
};
#endif
void pktlog_disable_adapter_logging(struct hif_opaque_softc *scn)
{