Re: [RFC PATCH] video: Use fb_sys_write rather than open-coding in drivers

From
Tomi Valkeinen <hidden>
Date
2014-02-12 08:17:10
Also in
lkml
Reply to
Ryan Mallon, 2014-02-12
On 12/02/14 07:02, Ryan Mallon wrote:
Well, the alternative is to supply an fb_write() implementation for each
driver that calls fb_sys_write(), and then updates the display. The
fb_sync() additions can be removed. That would cut down the boiler-plate
code, and should keep the behaviour the same.

If you don't think it is worth the effort, then the patch can just be
dropped.
I'd be very cautious about doing cleanups on drivers that you cannot
test. Small innocent looking changes can break them.

For example, your patch sets info->screen_size, which is not set
currently. Does the fbdev framework use screen_size somewhere
differently than smem_len? I don't know, but that could lead to small
difference in operation. However, in this case, fb_sys_write() actually
uses smem_len if screen_size is 0, so that change is not even needed.

ssd1307fb_write() looks a bit different than fb_sys_write. I don't know
if the differences could cause issues. The other ones look copy-pasted
from fb_sys_write (but I didn't look at them carefully), so perhaps
those could be cleaned up safely.

 Tomi

Attachments

Thread (6 messages) 6 messages, 2 authors, last reply 2014-02-12
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help