lkml.org 
[lkml]   [2010]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/6] staging: ft1000: Use misc device instead self created device.
On 11/23/2010 01:29 PM, Marek Belisko wrote:
> Use simple misc device for ioctl driver funtionality testing.
>
> Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
> ---
> drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c | 90 ++++++++++++++++++---
> 1 files changed, 77 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c b/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c
> index 1aec926..d1784a3 100644
> --- a/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c
> +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c
> @@ -32,6 +32,7 @@
> #include <linux/poll.h>
> #include <linux/netdevice.h>
> #include <linux/delay.h>
> +#include <linux/miscdevice.h>
>
> #include <linux/fs.h>
> #include <linux/kmod.h>
> @@ -78,6 +79,47 @@ static struct file_operations ft1000fops =
> .llseek = no_llseek,
> };
>
> +struct ft1000_misc_device {
> + struct miscdevice dev;
> + int inf_id;
> +};
> +
> +#define FREE_ID (0xFF)
> +
> +/* we support just 3 devices */
> +#define MAX_DEVICE 3

No, why this should be converted to miscdevice? Leave it as chrdev.

regards,
--
js


\
 
 \ /
  Last update: 2010-11-23 14:55    [W:1.617 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site