Commit 79995ed6 authored by Evgeny Sinelnikov's avatar Evgeny Sinelnikov

fix compilation with new kernels

parent fc876e6c
......@@ -13,6 +13,7 @@
#include <linux/poll.h>
#include <asm/uaccess.h> /* get_user put_user */
#include <linux/pipe_fs_i.h>
#include <linux/version.h>
#include "charbridge.h"
#define SUCCESS 0
......@@ -564,10 +565,14 @@ int init_module()
*/
void cleanup_module()
{
int ret;
int ret = 0;
//
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
unregister_chrdev(dev_major, DEVICE_FILE_NAME);
#else
ret = unregister_chrdev(dev_major, DEVICE_FILE_NAME);
#endif
// --
if (ret < 0)
......
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