demo/mmap: check subdevice exists and supports 'read' commands
demo/mmap: check subdevice exists and supports 'read' commands

Check the subdevice actually exists and that it claims to support 'read'
commands (SDF_CMD_READ subdevice flag set), bailing out early if not.

Linux-Comedi/comedilib,olsonse/comedilib,Linux-Comedi/comedilib,olsonse/comedilib,olsonse/comedilib,olsonse/comedilib,olsonse/comedilib,Linux-Comedi/comedilib,Linux-Comedi/comedilib,olsonse/comedilib,Linux-Comedi/comedilib,Linux-Comedi/comedilib