[1/4] drm/omap: Fix missing includes

Submitted by Tomi Valkeinen on April 19, 2016, 5:36 a.m.

Details

Message ID 5715C3C1.5000006@ti.com
State New
Headers show
Series "Series without cover letter" ( rev: 3 2 ) in DRI devel

Not browsing as part of any series.

Commit Message

Tomi Valkeinen April 19, 2016, 5:36 a.m.
On 19/04/16 05:17, Laurent Pinchart wrote:
> Hi Tomi,
> 
> Thank you for the patch.
> 
> On Monday 18 Apr 2016 18:42:11 Tomi Valkeinen wrote:
>> With certain kernel config options many omapdrm files fail to compile
>> due to missing include of linux/gpio/consumer.h and linux/of.h.
>>
>> This patch adds those includes.
>>
>> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
>> Reported-by: Dan Murphy <dmurphy@ti.com>
>> ---
>>  drivers/gpu/drm/omapdrm/displays/encoder-opa362.c           | 1 +
>>  drivers/gpu/drm/omapdrm/displays/panel-dpi.c                | 1 +
>>  drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c | 1 +
>>  drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c  | 1 +
>>  drivers/gpu/drm/omapdrm/dss/hdmi4.c                         | 1 +
>>  drivers/gpu/drm/omapdrm/dss/hdmi5.c                         | 1 +
>>  6 files changed, 6 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
>> b/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c index
>> 8c246c213e06..9f06a87e80c4 100644
>> --- a/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
>> +++ b/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
>> @@ -15,6 +15,7 @@
>>   */
>>
>>  #include <linux/gpio.h>
> 
> This driver uses the gpiod API only, you can remove gpio.h and of_gpio.h.

True. I don't want to mix fixes and cleanups, so I made a new patch for
that:

commit cdde6dcbf9fa0c5eadb42aac956a8ec3676aafb0 (HEAD -> 4.7/omapdrm)
Author: Tomi Valkeinen <tomi.valkeinen@ti.com>
Date:   Tue Apr 19 08:33:25 2016 +0300

    drm/omap: remove unneeded gpio includes

    encoder-opa362.c and panel-sharp-ls037v7dw01.c do not use the legacy
    GPIO API, so we can remove the including of gpio.h and of_gpio.h.

    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
b/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
index 9f06a87e80c4..e9b62a1bb5c5 100644
--- a/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
+++ b/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
@@ -14,12 +14,10 @@ 
  * the Free Software Foundation.
  */

-#include <linux/gpio.h>
 #include <linux/gpio/consumer.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
-#include <linux/of_gpio.h>

 #include <video/omapdss.h>

diff --git a/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c
b/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c
index 1de5146c83c0..bbf529f15971 100644
--- a/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c
+++ b/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c
@@ -10,11 +10,9 @@ 
  */

 #include <linux/delay.h>
-#include <linux/gpio.h>
 #include <linux/gpio/consumer.h>
 #include <linux/module.h>
 #include <linux/of.h>
-#include <linux/of_gpio.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 #include <linux/regulator/consumer.h>

Comments

Hi Tomi,

On Tuesday 19 Apr 2016 08:36:01 Tomi Valkeinen wrote:
> On 19/04/16 05:17, Laurent Pinchart wrote:
> > On Monday 18 Apr 2016 18:42:11 Tomi Valkeinen wrote:
> >> With certain kernel config options many omapdrm files fail to compile
> >> due to missing include of linux/gpio/consumer.h and linux/of.h.
> >> 
> >> This patch adds those includes.
> >> 
> >> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> >> Reported-by: Dan Murphy <dmurphy@ti.com>
> >> ---
> >> 
> >>  drivers/gpu/drm/omapdrm/displays/encoder-opa362.c           | 1 +
> >>  drivers/gpu/drm/omapdrm/displays/panel-dpi.c                | 1 +
> >>  drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c | 1 +
> >>  drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c  | 1 +
> >>  drivers/gpu/drm/omapdrm/dss/hdmi4.c                         | 1 +
> >>  drivers/gpu/drm/omapdrm/dss/hdmi5.c                         | 1 +
> >>  6 files changed, 6 insertions(+)
> >> 
> >> diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
> >> b/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c index
> >> 8c246c213e06..9f06a87e80c4 100644
> >> --- a/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
> >> +++ b/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
> >> @@ -15,6 +15,7 @@
> >> 
> >>   */
> >>  
> >>  #include <linux/gpio.h>
> > 
> > This driver uses the gpiod API only, you can remove gpio.h and of_gpio.h.
> 
> True. I don't want to mix fixes and cleanups, so I made a new patch for
> that:

Given that you touch the two files in your "Fix missing includes" patch that 
seems a bit overkill to me, I would have squashed the two together, but it 
doesn't matter too much.

> commit cdde6dcbf9fa0c5eadb42aac956a8ec3676aafb0 (HEAD -> 4.7/omapdrm)
> Author: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Date:   Tue Apr 19 08:33:25 2016 +0300
> 
>     drm/omap: remove unneeded gpio includes
> 
>     encoder-opa362.c and panel-sharp-ls037v7dw01.c do not use the legacy
>     GPIO API, so we can remove the including of gpio.h and of_gpio.h.
> 
>     Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> 
> diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
> b/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
> index 9f06a87e80c4..e9b62a1bb5c5 100644
> --- a/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
> +++ b/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
> @@ -14,12 +14,10 @@
>   * the Free Software Foundation.
>   */
> 
> -#include <linux/gpio.h>
>  #include <linux/gpio/consumer.h>
>  #include <linux/module.h>
>  #include <linux/platform_device.h>
>  #include <linux/slab.h>
> -#include <linux/of_gpio.h>
> 
>  #include <video/omapdss.h>
> 
> diff --git a/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c
> b/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c
> index 1de5146c83c0..bbf529f15971 100644
> --- a/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c
> +++ b/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c
> @@ -10,11 +10,9 @@
>   */
> 
>  #include <linux/delay.h>
> -#include <linux/gpio.h>
>  #include <linux/gpio/consumer.h>
>  #include <linux/module.h>
>  #include <linux/of.h>
> -#include <linux/of_gpio.h>
>  #include <linux/platform_device.h>
>  #include <linux/slab.h>
>  #include <linux/regulator/consumer.h>
On 19/04/16 11:32, Laurent Pinchart wrote:

>>> This driver uses the gpiod API only, you can remove gpio.h and of_gpio.h.
>>
>> True. I don't want to mix fixes and cleanups, so I made a new patch for
>> that:
> 
> Given that you touch the two files in your "Fix missing includes" patch that 
> seems a bit overkill to me, I would have squashed the two together, but it 
> doesn't matter too much.

If the only thing the "Fix missing includes" patch would do is to touch
those two files and add the gpio/consumer.h, then... maybe. But it's
touching other files, and adding of.h too.

Maybe I'm being too pedantic, but I don't want to mix separate things
into the same patch. If in the description I write "This patch also does
xyz", I know I should split it up =).

I could have squashed the patch and just talked about "cleaning up the
includes". But that's not true, as the first patch is fixing compilation
issues.

 Tomi