2 #define MINORMASK ((1U << MINORBITS) - 1)
4 #define MAJOR(dev) ((unsigned int) ((dev) >> MINORBITS))
5 #define MINOR(dev) ((unsigned int) ((dev) & MINORMASK))
6 #define MKDEV(ma,mi) (((ma) << MINORBITS) | (mi))
8 #define print_dev_t(buffer, dev) \
9 sprintf((buffer), "%u:%u\n", MAJOR(dev), MINOR(dev))
11 #define format_dev_t(buffer, dev) \
13 sprintf(buffer, "%u:%u", MAJOR(dev), MINOR(dev)); \