fix module params on 2.6.17, suppress warnings.
git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4005 3c298f89-4303-0410-b956-a3cf2f4a3e73master
parent
d72ac292bd
commit
d30fb9057e
|
@ -49,11 +49,19 @@ static int force = 0;
|
|||
|
||||
MODULE_AUTHOR("Felix Fietkau <openwrt@nbd.name>");
|
||||
MODULE_LICENSE("GPL");
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17)
|
||||
module_param(eecs, int, 0);
|
||||
module_param(eesk, int, 0);
|
||||
module_param(eedi, int, 0);
|
||||
module_param(eerc, int, 0);
|
||||
module_param(force, int, 0);
|
||||
#else
|
||||
MODULE_PARM(eecs, "i");
|
||||
MODULE_PARM(eesk, "i");
|
||||
MODULE_PARM(eedi, "i");
|
||||
MODULE_PARM(eerc, "i");
|
||||
MODULE_PARM(force, "i");
|
||||
#endif
|
||||
|
||||
/* Minimum timing constants */
|
||||
#define EECK_EDGE_TIME 3 /* 3us - max(adm 2.5us, 93c 1us) */
|
||||
|
@ -484,7 +492,7 @@ static int handle_counters(void *driver, char *buf, int nr)
|
|||
return len;
|
||||
}
|
||||
|
||||
static int detect_adm()
|
||||
static int detect_adm(void)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
|
@ -525,7 +533,7 @@ static int detect_adm()
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int __init adm_init()
|
||||
static int __init adm_init(void)
|
||||
{
|
||||
switch_config cfg[] = {
|
||||
{"registers", handle_registers, NULL},
|
||||
|
@ -561,7 +569,7 @@ static int __init adm_init()
|
|||
return switch_register_driver(&driver);
|
||||
}
|
||||
|
||||
static void __exit adm_exit()
|
||||
static void __exit adm_exit(void)
|
||||
{
|
||||
switch_unregister_driver(DRIVER_NAME);
|
||||
}
|
||||
|
|
|
@ -64,8 +64,8 @@ static ssize_t switch_proc_read(struct file *file, char *buf, size_t count, loff
|
|||
static ssize_t switch_proc_write(struct file *file, const char *buf, size_t count, void *data);
|
||||
|
||||
static struct file_operations switch_proc_fops = {
|
||||
read: switch_proc_read,
|
||||
write: switch_proc_write
|
||||
.read = (ssize_t (*) (struct file *, char __user *, size_t, loff_t *))switch_proc_read,
|
||||
.write = (ssize_t (*) (struct file *, const char __user *, size_t, loff_t *))switch_proc_write
|
||||
};
|
||||
|
||||
static ssize_t switch_proc_read(struct file *file, char *buf, size_t count, loff_t *ppos)
|
||||
|
@ -436,7 +436,7 @@ void switch_unregister_driver(char *name) {
|
|||
}
|
||||
}
|
||||
|
||||
static int __init switch_init()
|
||||
static int __init switch_init(void)
|
||||
{
|
||||
if ((switch_root = proc_mkdir("switch", NULL)) == NULL) {
|
||||
printk("%s: proc_mkdir failed.\n", __FILE__);
|
||||
|
@ -448,7 +448,7 @@ static int __init switch_init()
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void __exit switch_exit()
|
||||
static void __exit switch_exit(void)
|
||||
{
|
||||
remove_proc_entry("switch", NULL);
|
||||
}
|
||||
|
|
|
@ -162,6 +162,7 @@ static int robo_reg(__u8 page, __u8 reg, __u8 op)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
static void robo_read(__u8 page, __u8 reg, __u16 *val, int count)
|
||||
{
|
||||
int i;
|
||||
|
@ -171,6 +172,7 @@ static void robo_read(__u8 page, __u8 reg, __u16 *val, int count)
|
|||
for (i = 0; i < count; i++)
|
||||
val[i] = mdio_read(ROBO_PHY_ADDR, REG_MII_DATA0 + i);
|
||||
}
|
||||
*/
|
||||
|
||||
static __u16 robo_read16(__u8 page, __u8 reg)
|
||||
{
|
||||
|
@ -205,7 +207,7 @@ static void robo_write32(__u8 page, __u8 reg, __u32 val32)
|
|||
}
|
||||
|
||||
/* checks that attached switch is 5325E/5350 */
|
||||
static int robo_vlan5350()
|
||||
static int robo_vlan5350(void)
|
||||
{
|
||||
/* set vlan access id to 15 and read it back */
|
||||
__u16 val16 = 15;
|
||||
|
@ -220,7 +222,9 @@ static int robo_vlan5350()
|
|||
static int robo_probe(char *devname)
|
||||
{
|
||||
struct ethtool_drvinfo info;
|
||||
/*
|
||||
int i;
|
||||
*/
|
||||
__u32 phyid;
|
||||
|
||||
printk("Probing device %s: ", devname);
|
||||
|
@ -426,7 +430,7 @@ static int handle_reset(void *driver, char *buf, int nr)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int __init robo_init()
|
||||
static int __init robo_init(void)
|
||||
{
|
||||
int notfound = 1;
|
||||
|
||||
|
@ -466,7 +470,7 @@ static int __init robo_init()
|
|||
}
|
||||
}
|
||||
|
||||
static void __exit robo_exit()
|
||||
static void __exit robo_exit(void)
|
||||
{
|
||||
switch_unregister_driver(DRIVER_NAME);
|
||||
kfree(device);
|
||||
|
|
Loading…
Reference in New Issue