Subject: Re: cdevsw in the new device order
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: SODA Noriyuki <>
List: tech-kern
Date: 01/26/2005 12:51:41
>>>>> On Tue, 25 Jan 2005 22:20:24 -0500 (EST),
	der Mouse <mouse@Rodents.Montreal.QC.CA> said:

> What has replaced the traditional cdevsw in the new world order for
> device attachment?  I'm trying to port some code forward to 2.0 and I
> have a line
>  (*cdevsw[major(sc->cdev)].d_ioctl)(sc->cdev,...);

> What is a suitable repalcement for this in the new device attachment
> framework?

	const struct cdevsw *cdev = cdevsw_lookup(sc->cdev);
	(*cdev->d_open)(sc->cdev, ...);

> And, is there somewhere I can find these answers for myself?


Hmm, haven't this been included in section 9 yet?