Could be written a bit more clearly:
````
num_channels_for_this_device = adc_dev->driver->number_of_channels();
if (channel < offset + num_channels_for_this_device) {
...
} else {
  offset += num_channels_for_this_device;
}
````
Should also store num_channels_for_this_device in a variable so you don't need to call the lower driver twice just to skip it.