Re: LDD3 scull code doubt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/10/07, Andy Dalton <andy.dalton@xxxxxxxxx> wrote:
Hi Pradeep,

That redundancy is noted in the book's errata (the 'unconfirmed' section):

  http://www.oreilly.com/catalog/linuxdrive3/errata/linuxdrive3.unconfirmed

Thanks Andy
Good work.

~psr

Andy

On 4/9/07, pradeep singh <2500.pradeep@xxxxxxxxx> wrote:
>     cdev_init(&dev->cdev, &scull_fops);
>     dev->cdev.owner = THIS_MODULE;
>     dev->cdev.ops = &scull_fops;
>
> My doubt is
>   though we have used cdev_init(&dev->cdev, &scull_fops) to initiaize
> the fops structure for our embedded cdev, why are we again setting the
> dev->cdev.ops explicity again using
>    dev->cdev.ops = &scull_fops;
>
> Isn't cdev_init() supposed to do the initialisation?
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
> Please read the FAQ at http://kernelnewbies.org/FAQ



--
play the game

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux