File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -481,13 +481,14 @@ static int bma150_register_input_device(struct bma150_data *bma150)
481481 idev -> close = bma150_irq_close ;
482482 input_set_drvdata (idev , bma150 );
483483
484+ bma150 -> input = idev ;
485+
484486 error = input_register_device (idev );
485487 if (error ) {
486488 input_free_device (idev );
487489 return error ;
488490 }
489491
490- bma150 -> input = idev ;
491492 return 0 ;
492493}
493494
@@ -510,15 +511,15 @@ static int bma150_register_polled_device(struct bma150_data *bma150)
510511
511512 bma150_init_input_device (bma150 , ipoll_dev -> input );
512513
514+ bma150 -> input_polled = ipoll_dev ;
515+ bma150 -> input = ipoll_dev -> input ;
516+
513517 error = input_register_polled_device (ipoll_dev );
514518 if (error ) {
515519 input_free_polled_device (ipoll_dev );
516520 return error ;
517521 }
518522
519- bma150 -> input_polled = ipoll_dev ;
520- bma150 -> input = ipoll_dev -> input ;
521-
522523 return 0 ;
523524}
524525
You can’t perform that action at this time.
0 commit comments