All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: mengdeguo <mengdeguo@baidu.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: help about device driver
Date: Wed, 21 Dec 2011 19:51:15 -0800	[thread overview]
Message-ID: <20111222035115.GD14174@suse.de> (raw)
In-Reply-To: <55E19C299740714F83A6770B39E11B3515EB2828@MAILBOX03.internal.baidu.com>

On Thu, Dec 22, 2011 at 10:55:49AM +0800, mengdeguo wrote:
> Hi,
> 
> 
> 
>          I find a problem very confusing. Devices are divided into char/block/network dev. By the definition i2c, usb ,input devices belong to char devices. But walk across all the device driver, I can not find the cdev struct for them (i2c ,usb ,input devices). What's the problem ? This devices don't need cdev, if so, what do we do to associate file_operations with dev node?

What device node is associated with a usb device?

cdev structures are only there for character device nodes, the majority
of drivers never use that at all, that's what the different "class"es
are for (input, tty, misc, etc.)

greg k-h

           reply	other threads:[~2011-12-22  3:53 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <55E19C299740714F83A6770B39E11B3515EB2828@MAILBOX03.internal.baidu.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111222035115.GD14174@suse.de \
    --to=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mengdeguo@baidu.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.