Re: [PATCH RFC only] staging: dgap: fix OOPS on open of port

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

 



On Tue, Feb 25, 2014 at 02:35:39PM -0500, Mark Hounschell wrote:
> On 02/25/2014 01:40 PM, Mark Hounschell wrote:
> 
> >
> >>>+struct dgap_port {
> >>>+    struct tty_port port;
> >>>+};
> >>
> >>Do you really need a wrapping structure here?
> >>
> >
> >I may be incorrect, but I think so. I will investigate this further
> >before I make a patch.
> >
> 
> It looks to me like this is how it should be done. As future serial
> changes are done won't additional things be required to be added to
> dgap_port? port_ops? I certainly don't know what those future
> changes are but looking at other drivers (moxa.c) it looks so. What
> am I missing?

In the kernel we hate baggage like this.  Maybe it's a wrapper for
some historical reason, to support some other operating system or some
future reason; we hate it all.  Don't try to plan ahead, just write it
as it exists now because no one can predict the future.  Changing it
later is easier than everyone assumes.

regards,
dan carpenter

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux