Don't rely on typedef for struct ctl_table, it's going away

This commit is contained in:
Pavel Roskin 2014-06-17 11:28:06 -04:00
parent 0f5e6bf980
commit 19e85c5f13
7 changed files with 23 additions and 23 deletions

View File

@ -11150,7 +11150,7 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl, write, filp, buffer, lenp, ppos)
return ret; return ret;
} }
static const ctl_table ath_sysctl_template[] = { static const struct ctl_table ath_sysctl_template[] = {
{ ATH_INIT_CTL_NAME(CTL_AUTO) { ATH_INIT_CTL_NAME(CTL_AUTO)
.procname = "distance", .procname = "distance",
.mode = 0644, .mode = 0644,
@ -11480,7 +11480,7 @@ ath_announce(struct net_device *dev)
* Static (i.e. global) sysctls. Note that the HAL sysctls * Static (i.e. global) sysctls. Note that the HAL sysctls
* are located under ours by sharing the setting for DEV_ATH. * are located under ours by sharing the setting for DEV_ATH.
*/ */
static ctl_table ath_static_sysctls[] = { static struct ctl_table ath_static_sysctls[] = {
#ifdef AR_DEBUG #ifdef AR_DEBUG
{ ATH_INIT_CTL_NAME(CTL_AUTO) { ATH_INIT_CTL_NAME(CTL_AUTO)
.procname = "debug", .procname = "debug",
@ -11520,14 +11520,14 @@ static ctl_table ath_static_sysctls[] = {
}, },
{ } { }
}; };
static ctl_table ath_ath_table[] = { static struct ctl_table ath_ath_table[] = {
{ ATH_INIT_CTL_NAME(DEV_ATH) { ATH_INIT_CTL_NAME(DEV_ATH)
.procname = "ath", .procname = "ath",
.mode = 0555, .mode = 0555,
.child = ath_static_sysctls .child = ath_static_sysctls
}, { } }, { }
}; };
static ctl_table ath_root_table[] = { static struct ctl_table ath_root_table[] = {
{ ATH_INIT_CTL_NAME(CTL_DEV) { ATH_INIT_CTL_NAME(CTL_DEV)
.procname = "dev", .procname = "dev",
.mode = 0555, .mode = 0555,

View File

@ -117,13 +117,13 @@ typedef void irqreturn_t;
*/ */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32)
#define ATH_SYSCTL_DECL(f, ctl, write, filp, buffer, lenp, ppos) \ #define ATH_SYSCTL_DECL(f, ctl, write, filp, buffer, lenp, ppos) \
f(ctl_table *ctl, int write, struct file *filp, \ f(struct ctl_table *ctl, int write, struct file *filp, \
void __user *buffer, size_t *lenp, loff_t *ppos) void __user *buffer, size_t *lenp, loff_t *ppos)
#define ATH_SYSCTL_PROC_DOINTVEC(ctl, write, filp, buffer, lenp, ppos) \ #define ATH_SYSCTL_PROC_DOINTVEC(ctl, write, filp, buffer, lenp, ppos) \
proc_dointvec(ctl, write, filp, buffer, lenp, ppos) proc_dointvec(ctl, write, filp, buffer, lenp, ppos)
#else /* Linux 2.6.32+ */ #else /* Linux 2.6.32+ */
#define ATH_SYSCTL_DECL(f, ctl, write, filp, buffer, lenp, ppos) \ #define ATH_SYSCTL_DECL(f, ctl, write, filp, buffer, lenp, ppos) \
f(ctl_table *ctl, int write, \ f(struct ctl_table *ctl, int write, \
void __user *buffer, size_t *lenp, loff_t *ppos) void __user *buffer, size_t *lenp, loff_t *ppos)
#define ATH_SYSCTL_PROC_DOINTVEC(ctl, write, filp, buffer, lenp, ppos) \ #define ATH_SYSCTL_PROC_DOINTVEC(ctl, write, filp, buffer, lenp, ppos) \
proc_dointvec(ctl, write, buffer, lenp, ppos) proc_dointvec(ctl, write, buffer, lenp, ppos)

View File

@ -183,12 +183,12 @@ ath_hal_setlogging(int enable)
*/ */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,8) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,8)
#define AH_SYSCTL_ARGS_DECL \ #define AH_SYSCTL_ARGS_DECL \
ctl_table *ctl, int write, struct file *filp, void *buffer, \ struct ctl_table *ctl, int write, struct file *filp, void *buffer, \
size_t *lenp size_t *lenp
#define AH_SYSCTL_ARGS ctl, write, filp, buffer, lenp #define AH_SYSCTL_ARGS ctl, write, filp, buffer, lenp
#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,8) */ #else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,8) */
#define AH_SYSCTL_ARGS_DECL \ #define AH_SYSCTL_ARGS_DECL \
ctl_table *ctl, int write, struct file *filp, void *buffer,\ struct ctl_table *ctl, int write, struct file *filp, void *buffer,\
size_t *lenp, loff_t *ppos size_t *lenp, loff_t *ppos
#define AH_SYSCTL_ARGS ctl, write, filp, buffer, lenp, ppos #define AH_SYSCTL_ARGS ctl, write, filp, buffer, lenp, ppos
#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,8) */ #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,8) */
@ -973,7 +973,7 @@ ath_hal_memcmp(const void *a, const void *b, size_t n)
} }
EXPORT_SYMBOL(ath_hal_memcmp); EXPORT_SYMBOL(ath_hal_memcmp);
static ctl_table ath_hal_sysctls[] = { static struct ctl_table ath_hal_sysctls[] = {
#ifdef AH_DEBUG #ifdef AH_DEBUG
{ ATH_INIT_CTL_NAME(CTL_AUTO) { ATH_INIT_CTL_NAME(CTL_AUTO)
.procname = "debug", .procname = "debug",
@ -1027,21 +1027,21 @@ static ctl_table ath_hal_sysctls[] = {
#endif /* AH_DEBUG_ALQ */ #endif /* AH_DEBUG_ALQ */
{ } { }
}; };
static ctl_table ath_hal_table[] = { static struct ctl_table ath_hal_table[] = {
{ ATH_INIT_CTL_NAME(CTL_AUTO) { ATH_INIT_CTL_NAME(CTL_AUTO)
.procname = "hal", .procname = "hal",
.mode = 0555, .mode = 0555,
.child = ath_hal_sysctls .child = ath_hal_sysctls
}, { } }, { }
}; };
static ctl_table ath_ath_table[] = { static struct ctl_table ath_ath_table[] = {
{ ATH_INIT_CTL_NAME(DEV_ATH) { ATH_INIT_CTL_NAME(DEV_ATH)
.procname = "ath", .procname = "ath",
.mode = 0555, .mode = 0555,
.child = ath_hal_table .child = ath_hal_table
}, { } }, { }
}; };
static ctl_table ath_root_table[] = { static struct ctl_table ath_root_table[] = {
{ ATH_INIT_CTL_NAME(CTL_DEV) { ATH_INIT_CTL_NAME(CTL_DEV)
.procname = "dev", .procname = "dev",
.mode = 0555, .mode = 0555,

View File

@ -500,7 +500,7 @@ static int min_threshold = 1;
* Static (i.e. global) sysctls. * Static (i.e. global) sysctls.
*/ */
static ctl_table ath_rate_static_sysctls[] = { static struct ctl_table ath_rate_static_sysctls[] = {
{ ATH_INIT_CTL_NAME(CTL_AUTO) { ATH_INIT_CTL_NAME(CTL_AUTO)
.procname = "interval", .procname = "interval",
.mode = 0644, .mode = 0644,
@ -530,21 +530,21 @@ static ctl_table ath_rate_static_sysctls[] = {
}, },
{ } { }
}; };
static ctl_table ath_rate_table[] = { static struct ctl_table ath_rate_table[] = {
{ ATH_INIT_CTL_NAME(CTL_AUTO) { ATH_INIT_CTL_NAME(CTL_AUTO)
.procname = "rate_amrr", .procname = "rate_amrr",
.mode = 0555, .mode = 0555,
.child = ath_rate_static_sysctls .child = ath_rate_static_sysctls
}, { } }, { }
}; };
static ctl_table ath_ath_table[] = { static struct ctl_table ath_ath_table[] = {
{ ATH_INIT_CTL_NAME(DEV_ATH) { ATH_INIT_CTL_NAME(DEV_ATH)
.procname = "ath", .procname = "ath",
.mode = 0555, .mode = 0555,
.child = ath_rate_table .child = ath_rate_table
}, { } }, { }
}; };
static ctl_table ath_root_table[] = { static struct ctl_table ath_root_table[] = {
{ ATH_INIT_CTL_NAME(CTL_DEV) { ATH_INIT_CTL_NAME(CTL_DEV)
.procname = "dev", .procname = "dev",
.mode = 0555, .mode = 0555,

View File

@ -448,7 +448,7 @@ static int maxint = 0x7fffffff; /* 32-bit big */
/* /*
* Static (i.e. global) sysctls. * Static (i.e. global) sysctls.
*/ */
static ctl_table ath_rate_static_sysctls[] = { static struct ctl_table ath_rate_static_sysctls[] = {
{ ATH_INIT_CTL_NAME(CTL_AUTO) { ATH_INIT_CTL_NAME(CTL_AUTO)
.procname = "interval", .procname = "interval",
.mode = 0644, .mode = 0644,
@ -476,21 +476,21 @@ static ctl_table ath_rate_static_sysctls[] = {
}, },
{ } { }
}; };
static ctl_table ath_rate_table[] = { static struct ctl_table ath_rate_table[] = {
{ ATH_INIT_CTL_NAME(CTL_AUTO) { ATH_INIT_CTL_NAME(CTL_AUTO)
.procname = "rate_onoe", .procname = "rate_onoe",
.mode = 0555, .mode = 0555,
.child = ath_rate_static_sysctls .child = ath_rate_static_sysctls
}, { } }, { }
}; };
static ctl_table ath_ath_table[] = { static struct ctl_table ath_ath_table[] = {
{ ATH_INIT_CTL_NAME(DEV_ATH) { ATH_INIT_CTL_NAME(DEV_ATH)
.procname = "ath", .procname = "ath",
.mode = 0555, .mode = 0555,
.child = ath_rate_table .child = ath_rate_table
}, { } }, { }
}; };
static ctl_table ath_root_table[] = { static struct ctl_table ath_root_table[] = {
{ ATH_INIT_CTL_NAME(CTL_DEV) { ATH_INIT_CTL_NAME(CTL_DEV)
.procname = "dev", .procname = "dev",
.mode = 0555, .mode = 0555,

View File

@ -889,7 +889,7 @@ IEEE80211_SYSCTL_DECL(ieee80211_sysctl_monitor_crc_errors, ctl, write, filp, buf
return ret; return ret;
} }
static const ctl_table ieee80211_sysctl_template[] = { static const struct ctl_table ieee80211_sysctl_template[] = {
#ifdef IEEE80211_DEBUG #ifdef IEEE80211_DEBUG
{ ATH_INIT_CTL_NAME(CTL_AUTO) { ATH_INIT_CTL_NAME(CTL_AUTO)
.procname = "debug", .procname = "debug",

View File

@ -538,13 +538,13 @@ extern void skb_queue_drain(struct sk_buff_head *q);
*/ */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32)
#define IEEE80211_SYSCTL_DECL(f, ctl, write, filp, buffer, lenp, ppos) \ #define IEEE80211_SYSCTL_DECL(f, ctl, write, filp, buffer, lenp, ppos) \
f(ctl_table *ctl, int write, struct file *filp, \ f(struct ctl_table *ctl, int write, struct file *filp, \
void __user *buffer, size_t *lenp, loff_t *ppos) void __user *buffer, size_t *lenp, loff_t *ppos)
#define IEEE80211_SYSCTL_PROC_DOINTVEC(ctl, write, filp, buffer, lenp, ppos) \ #define IEEE80211_SYSCTL_PROC_DOINTVEC(ctl, write, filp, buffer, lenp, ppos) \
proc_dointvec(ctl, write, filp, buffer, lenp, ppos) proc_dointvec(ctl, write, filp, buffer, lenp, ppos)
#else /* Linux 2.6.32+ */ #else /* Linux 2.6.32+ */
#define IEEE80211_SYSCTL_DECL(f, ctl, write, filp, buffer, lenp, ppos) \ #define IEEE80211_SYSCTL_DECL(f, ctl, write, filp, buffer, lenp, ppos) \
f(ctl_table *ctl, int write, \ f(struct ctl_table *ctl, int write, \
void __user *buffer, size_t *lenp, loff_t *ppos) void __user *buffer, size_t *lenp, loff_t *ppos)
#define IEEE80211_SYSCTL_PROC_DOINTVEC(ctl, write, filp, buffer, lenp, ppos) \ #define IEEE80211_SYSCTL_PROC_DOINTVEC(ctl, write, filp, buffer, lenp, ppos) \
proc_dointvec(ctl, write, buffer, lenp, ppos) proc_dointvec(ctl, write, buffer, lenp, ppos)