lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200703221137.35906.dtor@insightbb.com>
Date:	Thu, 22 Mar 2007 11:37:34 -0400
From:	Dmitry Torokhov <dtor@...ightbb.com>
To:	Nicolas Boichat <nicolas@...chat.ch>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, lm-sensors@...sensors.org,
	rlove@...ve.org, linux-kernel@...smi.ch
Subject: Re: [PATCH] Apple SMC driver (hardware monitoring and control)

Hi Nicolas,

On Monday 19 March 2007 01:19, Nicolas Boichat wrote:
> +       /* initialize the input class */
> +       applesmc_idev->name = "applesmc";

You may want to set applesmc_idev->id.bus = BUS_HOST;

> +       applesmc_idev->cdev.dev = &pdev->dev;
> +       applesmc_idev->evbit[0] = BIT(EV_ABS);
> +       input_set_abs_params(applesmc_idev, ABS_X,
> +                       -256, 256, APPLESMC_INPUT_FUZZ, APPLESMC_INPUT_FLAT);
> +       input_set_abs_params(applesmc_idev, ABS_Y,
> +                       -256, 256, APPLESMC_INPUT_FUZZ, APPLESMC_INPUT_FLAT);
> +
> +       input_register_device(applesmc_idev);

Please add error hanling here.

> +
> +       /* start up our timer for the input device */
> +       init_timer(&applesmc_timer);
> +       applesmc_timer.function = applesmc_mousedev_poll;
> +       applesmc_timer.expires = jiffies + APPLESMC_POLL_PERIOD;
> +       add_timer(&applesmc_timer);
> 

Please consider implemention open and close methods for the input
device and start/stop timer from there - there is no point of checking
hardware state if noone is listening to events. 

-- 
Dmitry
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ