The following commit has been merged in the master branch: commit d12f37978e17567ac05ab34d54b66236d4340f22 Author: simon simon@45894c77-fb22-0410-b583-ff6e7d5dbf6c Date: Sat Oct 17 17:58:14 2009 +0000
remove warning when unregistering device as it won't be checked for newer kernels. Adjust style according to checkpatchs (2.6.30) recommendations
git-svn-id: http://downloads.open-mesh.net/svn/batman/trunk/batman-adv-kernelland@1448 45894c77-fb22-0410-b583-ff6e7d5dbf6c
diff --git a/device.c b/device.c index 6383839..c5fc6fe 100644 --- a/device.c +++ b/device.c @@ -79,8 +79,6 @@ int bat_device_setup(void)
void bat_device_destroy(void) { - int result = 0; - if (!Major) return;
@@ -88,14 +86,7 @@ void bat_device_destroy(void) class_destroy(batman_class);
/* Unregister the device */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 23) - result = unregister_chrdev(Major, DRIVER_DEVICE); -#else unregister_chrdev(Major, DRIVER_DEVICE); -#endif - - if (result < 0) - debug_log(LOG_TYPE_WARN, "Unregistering the character device failed with %d\n", result);
Major = 0; } @@ -266,8 +257,8 @@ ssize_t bat_device_write(struct file *file, const char __user *buff, ETH_ALEN);
send_raw_packet((unsigned char *)&icmp_packet, - sizeof(struct icmp_packet), - batman_if, orig_node->router->addr); + sizeof(struct icmp_packet), + batman_if, orig_node->router->addr);
spin_unlock(&orig_hash_lock); goto out;