lkml.org 
[lkml]   [2012]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] i2c / ACPI: add ACPI enumeration support
On Sun, Nov 04, 2012 at 09:50:31AM +0100, Jean Delvare wrote:
> On Sun, 4 Nov 2012 09:23:17 +0200, Mika Westerberg wrote:
> > On Sat, Nov 03, 2012 at 10:52:46PM +0100, Jean Delvare wrote:
> > > On Sat, 3 Nov 2012 09:46:33 +0200, Mika Westerberg wrote:
> > > > --- /dev/null
> > > > +++ b/drivers/acpi/acpi_i2c.c
> > > > @@ -0,0 +1,234 @@
> > > > +/*
> > > > + * ACPI I2C enumeration support
> > > > + *
> > > > + * Copyright (C) 2012, Intel Corporation
> > > > + * Author: Mika Westerberg <mika.westerberg@linux.intel.com>
> > > > + *
> > > > + * This program is free software; you can redistribute it and/or modify
> > > > + * it under the terms of the GNU General Public License version 2 as
> > > > + * published by the Free Software Foundation.
> > > > + */
> > > > +
> > > > +#include <linux/acpi.h>
> > > > +#include <linux/i2c.h>
> > > > +#include <linux/module.h>
> > >
> > > You also need <linux/device.h> for dev_err() etc., and <linux/err.h> for
> > > ENODEV etc.
> >
> > I think <acpi.h> already includes <device.h> but I'll double check. At
> > least this compiles without those headers in place :)
>
> That's not really the point. You never know which header inclusions
> will be removed from other header files in the future, so you should
> include what you need explicitly. This avoids future build breakages as
> well as build breakages on other architectures.

Right. I've actually seen this problem few times before. I added the
inclusion of <devide.h> and <err.h> to the file.

Thanks.


\
 
 \ /
  Last update: 2012-11-04 12:21    [W:0.056 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site