Re: writing driver code supporting multiple linux kernel versions

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

 



On Mon, Oct 10, 2005 at 08:31:43PM +0530, kaustav.majumdar@xxxxxxxxx wrote:
> Hi,
> 
> Actually I want to write a single code using some macro to identify the
> kernel version and using preprocessor directives during preprocessing
> time which code snippet will be there, that I want to decide....
> 
> Like 
> #if UTS_RELEASE == 2.6.9
> 	some code
> #elif UTS_RELEASE == 2.6.13
> 	some code
> #endif
> 
> can I do this

Have you tried it?

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux