[lkml]   [2004]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [rfc][patch] DRM initial function table support.
On Tue, Aug 31, 2004 at 09:07:11AM -0700, Ian Romanick wrote:
> I think the intention is to have default functions set in the
> device-independent code and have the device-dependent code over-ride
> them. Since the defaults may not always be NULL, doing a struct like
> that wouldn't really work. I suppose we could have a struct and a
> device-independent function that copies the non-NULL pointers from the
> per-device struct. Would that be better?

Don't copy them. Just put

if (foo->ops->method1)

in your code. It's an additional branch, but you avoid the indirect
functioncalloverhead in exchange.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:05    [W:0.053 / U:1.144 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site