Re: [PATCH v2] Staging: comedi: drivers: comedi_test: Add auto-configuration capability

2017-02-16 Thread Cheah Kok Cheong
On Thu, Feb 16, 2017 at 10:10:34AM +, Ian Abbott wrote: > On 15/02/17 06:05, Cheah Kok Cheong wrote: > >On Mon, Feb 13, 2017 at 11:14:14AM +, Ian Abbott wrote: > >>On 11/02/17 10:37, Cheah Kok Cheong wrote: > [snip] > >>>+static void __exit comedi_test_exit(void) > >>>+{ > >>>+ comedi_auto

Re: [PATCH v2] Staging: comedi: drivers: comedi_test: Add auto-configuration capability

2017-02-16 Thread Ian Abbott
On 15/02/17 06:05, Cheah Kok Cheong wrote: On Mon, Feb 13, 2017 at 11:14:14AM +, Ian Abbott wrote: On 11/02/17 10:37, Cheah Kok Cheong wrote: [snip] +static void __exit comedi_test_exit(void) +{ + comedi_auto_unconfig(ctdev); + + device_destroy(ctcls, MKDEV(0, 0)); + + cl

Re: [PATCH v2] Staging: comedi: drivers: comedi_test: Add auto-configuration capability

2017-02-15 Thread Cheah Kok Cheong
On Mon, Feb 13, 2017 at 11:14:14AM +, Ian Abbott wrote: > On 11/02/17 10:37, Cheah Kok Cheong wrote: > >+static int __init comedi_test_init(void) > >+{ > >+int ret; > >+ > >+ret = comedi_driver_register(&waveform_driver); > >+if (ret) { > >+pr_err("comedi_test: unable to

Re: [PATCH v2] Staging: comedi: drivers: comedi_test: Add auto-configuration capability

2017-02-13 Thread Ian Abbott
On 11/02/17 10:37, Cheah Kok Cheong wrote: Currently this module needs to be manually configured by COMEDI userspace tool before the test waveform can be read by a COMEDI compatible application. This patch adds auto-configuration capability and makes it the default loading option. This is achiev