lkml.org 
[lkml]   [2015]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 10/14] init: deps: IDs for annotated initcalls
From
Date
Am 20.10.2015 um 12:42 schrieb Alexander Holler:

>> Another idea to split this one file into multiple ones would be to
>> reserve blocks of IDs. E.g. use 10000-20000 for networking stuff,
>> 1000-1200 for I2C and so on.
>
> In detail it could look like
>
> driver_ids_base.h:
>
> enum {
> drvid_i2c_base = 1000,
> drvid_networking_base = 1200,
> drvid_usb_base = 3000,
> };
>
> driver_ids_i2c.h:
>
> # include "driver_ids_base.h"
>
> enum {
> drvid_i2c_start = drvid_i2c_base,
>
> /* drivers/i2c */
> drvid_i2c,
> drvid_i2c_dev,
> drvid_i2c_busses_start,
> /* drivers/i2c/busses */
> drvid_i2c_gpio,
> (...)
>
> drvid_i2c_end
> };

Which, of course, should be enhanced with a compile time error if
drvid_i2c_end >= drvid_networking_base.




\
 
 \ /
  Last update: 2015-10-20 13:21    [W:0.087 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site