Re: [PATCH] ACPI: thinkpad-acpi: register input device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 26 May 2007, Dmitry Torokhov wrote:
> On Saturday 26 May 2007 13:31, Henrique de Moraes Holschuh wrote:
> > Register an input device to send input events to userspace.
> > 
> > This patch is based on a patch by Richard Hughes <hughsient@xxxxxxxxx>.
> > 
> > Signed-off-by: Henrique de Moraes Holschuh <hmh@xxxxxxxxxx>
> > Cc: Richard Hughes <hughsient@xxxxxxxxx>
> 
> Looks OK, however I am curious why you split registration and generating
> input events into 2 patches...

The registration is driver-wide.  The input events are specific for the
hotkey subdriver.  Other subdrivers will also use the input device, etc.

And, unless requested, I really go with small and very obvious patches.
Makes it really, really easy to fix and review.  Of course the rule that
"the driver must compile *and work* fine at every patch set" to keep it
bissect friendly has higher priority.

> >  static struct platform_device *tpacpi_pdev = NULL;
> >  static struct class_device *tpacpi_hwmon = NULL;
> > +static struct input_dev *tpacpi_inputdev = NULL;
> 
> Why do you initialize static variables?  They are guaranteed to be 0/NULL.

Usually just to shut up gcc.  I will try to remove all initializers and see
if gcc 4.1.2 still complains.  If it doesn't, I will remove all of them in
the entire driver.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux