Re: [PATCHv3] drivers/misc: Altera active serial implementation

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Indan Zupancic
Date: Monday, November 15, 2010 - 5:47 pm

Hello,

On Mon, November 15, 2010 11:28, Jiri Slaby wrote:

Yes.

Get rid of the array and minor lookup, and instead use container_of()
to get struct altera_as_device directly from file->private_data, which
is a pointer to miscdev, set by misc_open().

Sorry for not noticing this before.


Ther are only as many minors allocates as needed, not always 16.
Almost always there will be only one FPGA, maybe a couple, but
more is very rare. And when that's the case there are probably
not many other misc devices around either, or they use a more
scalable way to program many FPGAs.

This is niche enough, don't make it more complicated than needed.
Having its own major seems overkill.


Just put the misc_register() call at the end and it should be fine,
once the array is gone.


Greetings,

Indan


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCHv3] drivers/misc: Altera active serial implement ..., Indan Zupancic, (Mon Nov 15, 5:47 pm)