Commit 04c66201 authored by Marek Belisko's avatar Marek Belisko Committed by Greg Kroah-Hartman

staging: ft1000: Fix coding style.

Fix coding style in ft1000CleanupProc and ft1000InitProc
functions.
Signed-off-by: default avatarMarek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 5fd866fb
...@@ -196,12 +196,12 @@ static struct notifier_block ft1000_netdev_notifier = { ...@@ -196,12 +196,12 @@ static struct notifier_block ft1000_netdev_notifier = {
int ft1000InitProc(struct net_device *dev) int ft1000InitProc(struct net_device *dev)
{ {
struct ft1000_info *info; struct ft1000_info *info;
struct proc_dir_entry *ft1000_proc_file; struct proc_dir_entry *ft1000_proc_file;
int ret = 0; int ret = 0;
info = netdev_priv(dev); info = netdev_priv(dev);
info->ft1000_proc_dir = proc_mkdir (FT1000_PROC_DIR, FTNET_PROC); info->ft1000_proc_dir = proc_mkdir(FT1000_PROC_DIR, FTNET_PROC);
if (info->ft1000_proc_dir == NULL) { if (info->ft1000_proc_dir == NULL) {
printk(KERN_WARNING "Unable to create %s dir.\n", printk(KERN_WARNING "Unable to create %s dir.\n",
FT1000_PROC_DIR); FT1000_PROC_DIR);
...@@ -209,16 +209,18 @@ int ft1000InitProc(struct net_device *dev) ...@@ -209,16 +209,18 @@ int ft1000InitProc(struct net_device *dev)
goto fail; goto fail;
} }
ft1000_proc_file = ft1000_proc_file =
create_proc_read_entry (dev->name, 0644, info->ft1000_proc_dir, create_proc_read_entry(dev->name, 0644,
ft1000ReadProc, dev); info->ft1000_proc_dir, ft1000ReadProc, dev);
if (ft1000_proc_file == NULL) { if (ft1000_proc_file == NULL) {
printk(KERN_WARNING "Unable to create /proc entry.\n"); printk(KERN_WARNING "Unable to create /proc entry.\n");
ret = -EINVAL; ret = -EINVAL;
goto fail_entry; goto fail_entry;
} }
snprintf (info->netdevname, IFNAMSIZ, "%s", dev->name); snprintf(info->netdevname, IFNAMSIZ, "%s", dev->name);
ret = register_netdevice_notifier(&ft1000_netdev_notifier); ret = register_netdevice_notifier(&ft1000_netdev_notifier);
if (ret) if (ret)
goto fail_notif; goto fail_notif;
...@@ -233,12 +235,9 @@ int ft1000InitProc(struct net_device *dev) ...@@ -233,12 +235,9 @@ int ft1000InitProc(struct net_device *dev)
return ret; return ret;
} }
void void ft1000CleanupProc(struct ft1000_info *info)
ft1000CleanupProc(struct ft1000_info *info)
{ {
remove_proc_entry (info->netdevname, info->ft1000_proc_dir); remove_proc_entry(info->netdevname, info->ft1000_proc_dir);
remove_proc_entry (FT1000_PROC_DIR, FTNET_PROC); remove_proc_entry(FT1000_PROC_DIR, FTNET_PROC);
unregister_netdevice_notifier (&ft1000_netdev_notifier); unregister_netdevice_notifier(&ft1000_netdev_notifier);
return;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment