lkml.org 
[lkml]   [2004]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 5/14 linux-2.6.7-rc1] prism54: new prism54 kernel compatibility
From
Date
On Mon, 2004-05-24 at 10:32, Luis R. Rodriguez wrote:
> 2004-03-20 Margit Schubert-While <margitsw@t-online.de>
>
> * isl_38xx.[ch], isl_ioctl.c, islpci_dev.[ch], islpci_eth.c
> islpci_hotplug.c, islpci_mgt.[ch], oid_mgt.c: Adopt new
> prism54 kernel compatibility.
>
> * prismcompat.h, prismcompat24.h: New compatibility work


ewwww this makes the driver quite a bit less readable!

for example

-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
- /* This is 2.6 specific, nicer, shorter, but not in 2.4 yet */
- DEFINE_WAIT(wait);
- prepare_to_wait(&priv->reset_done, &wait, TASK_UNINTERRUPTIBLE);
-#else
- DECLARE_WAITQUEUE(wait, current);
- set_current_state(TASK_UNINTERRUPTIBLE);
- add_wait_queue(&priv->reset_done, &wait);
-#endif
+ PRISM_DEFWAITQ(priv->reset_done, wait)

why not just make a DEFINE_WAIT() and prepare_to_wait() macro for 2.4
instead ?? so that you can just have the 2.6 version in the code and do
2.4 compat in a clean header, as opposed to fouling up the entire driver
with it.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 14:03    [W:0.042 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site