[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201103252335.14676.arnd@arndb.de>
Date: Fri, 25 Mar 2011 23:35:14 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Jamie Iles <jamie@...ieiles.com>
Cc: linux-kernel@...r.kernel.org, gregkh@...e.de, vapier@...too.org
Subject: Re: [RFC PATCHv2 1/4] drivers/otp: add initial support for OTP memory
On Friday 25 March 2011 23:23:46 Jamie Iles wrote:
> Thanks for taking the time to look at this. I think I've addressed all
> of your comments in the v3 series apart from defining OTP (which really
> does need to be done so I'll make sure I do that in v4) and the sysfs
> bus/class stuff.
Wow, that was quick!
One more thing that I just realized:
I think it would be better not to allow arbitrary ioctl commands to
be interpreted by the individual drivers. Instead, interpret them
in the common code and pass the data to the drivers through separate
otp_device_ops function pointers, one per ioctl command.
This will reduce the amount of code needed in each driver when you
have multiple ones implementing the same ioctls, and help to
ensure that they all treat the arguments in the same way.
Also, you should have a compat_ioctl file operation. As long as
your data structures are compatible between 32 and 64 bit, it
can point to the same function as the .unlocked_ioctl one.
Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists