Hi, I have defined a header file for ioctls macros definitions. I am including it in both, my user space application as well as in my device driver. Now there are some macros that I want to be visible only in device drive and some only in user space application. Is there any set of macros defined in linux for such purpose? This is my present header file
gpio_ioctl.h #ifndef _GPIO_IOCTL_H_ #define _GPIO_IOCTL_H_ /* * Ioctl definitions */ /* Use 250 as type/magic number */ #define GPIO_IOC_MAGIC 250 #define GPIO_READ _IOW (GPIO_IOC_MAGIC, 0, int) #define GPIO_WRITE _IOW (GPIO_IOC_MAGIC, 1, int) #define GPIO_IOC_MAXNR 2 #ifdef _DEVICE_DRIVE_ ---> these macros should not be visible in user space application #define ... ... .. #endif #ifdef _USER_SPACE_ ---> these macros should not be visible in device driver i.e kernel space #define ... ... .. #endif /*_GPIO_IOCTL_H_ */ Thanks in advance Ravi Gupta
_______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev