public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] apple-gmux: Correctly depend on apple_bl for building
@ 2012-06-28 10:36 Arun Raghavan
  2012-06-28 13:20 ` Seth Forshee
  0 siblings, 1 reply; 7+ messages in thread
From: Arun Raghavan @ 2012-06-28 10:36 UTC (permalink / raw)
  To: Seth Forshee, Matthew Garrett
  Cc: platform-driver-x86, linux-kernel, Arun Raghavan

apple_bl_register/unregister() are unconditionally used now, so we need
to make sure that apple_bl is selected appropriately (built-in/module)
if apple-gmux is being built.

Signed-off-by: Arun Raghavan <arun.raghavan@collabora.co.uk>
---
 drivers/platform/x86/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index 2a262f5..708f835 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -759,7 +759,7 @@ config SAMSUNG_Q10
 config APPLE_GMUX
 	tristate "Apple Gmux Driver"
 	depends on PNP
-	select BACKLIGHT_CLASS_DEVICE
+	select BACKLIGHT_APPLE
 	---help---
 	  This driver provides support for the gmux device found on many
 	  Apple laptops, which controls the display mux for the hybrid
-- 
1.7.8.6


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] apple-gmux: Correctly depend on apple_bl for building
  2012-06-28 10:36 [PATCH] apple-gmux: Correctly depend on apple_bl for building Arun Raghavan
@ 2012-06-28 13:20 ` Seth Forshee
  2012-06-28 13:23   ` Arun Raghavan
  0 siblings, 1 reply; 7+ messages in thread
From: Seth Forshee @ 2012-06-28 13:20 UTC (permalink / raw)
  To: Arun Raghavan; +Cc: Matthew Garrett, platform-driver-x86, linux-kernel

On Thu, Jun 28, 2012 at 04:06:36PM +0530, Arun Raghavan wrote:
> apple_bl_register/unregister() are unconditionally used now, so we need
> to make sure that apple_bl is selected appropriately (built-in/module)
> if apple-gmux is being built.

apple_bl.h provides stubs for these functions when apple_bl is not
built, so this shouldn't be necessary. Are you encoutering a situation
that causes build problems?

Seth


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] apple-gmux: Correctly depend on apple_bl for building
  2012-06-28 13:20 ` Seth Forshee
@ 2012-06-28 13:23   ` Arun Raghavan
  2012-06-28 13:48     ` Seth Forshee
  0 siblings, 1 reply; 7+ messages in thread
From: Arun Raghavan @ 2012-06-28 13:23 UTC (permalink / raw)
  To: Seth Forshee; +Cc: Matthew Garrett, platform-driver-x86, linux-kernel

On Thu, 2012-06-28 at 08:20 -0500, Seth Forshee wrote:
> On Thu, Jun 28, 2012 at 04:06:36PM +0530, Arun Raghavan wrote:
> > apple_bl_register/unregister() are unconditionally used now, so we need
> > to make sure that apple_bl is selected appropriately (built-in/module)
> > if apple-gmux is being built.
> 
> apple_bl.h provides stubs for these functions when apple_bl is not
> built, so this shouldn't be necessary. Are you encoutering a situation
> that causes build problems?

Yes, I am. With CONFIG_BACKLIGHT_APPLE=m and CONFIG_APPLE_GMUX=y, I see
the following error:

  LD      init/built-in.o
drivers/built-in.o: In function `gmux_probe':
apple-gmux.c:(.devinit.text+0xa769): undefined reference to `apple_bl_unregister'
drivers/built-in.o: In function `gmux_remove':
apple-gmux.c:(.devexit.text+0x46d): undefined reference to `apple_bl_register'

-- Arun


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] apple-gmux: Correctly depend on apple_bl for building
  2012-06-28 13:23   ` Arun Raghavan
@ 2012-06-28 13:48     ` Seth Forshee
  2012-06-28 13:50       ` Seth Forshee
  2012-06-28 13:51       ` Arun Raghavan
  0 siblings, 2 replies; 7+ messages in thread
From: Seth Forshee @ 2012-06-28 13:48 UTC (permalink / raw)
  To: Arun Raghavan; +Cc: Matthew Garrett, platform-driver-x86, linux-kernel

On Thu, Jun 28, 2012 at 06:53:35PM +0530, Arun Raghavan wrote:
> On Thu, 2012-06-28 at 08:20 -0500, Seth Forshee wrote:
> > On Thu, Jun 28, 2012 at 04:06:36PM +0530, Arun Raghavan wrote:
> > > apple_bl_register/unregister() are unconditionally used now, so we need
> > > to make sure that apple_bl is selected appropriately (built-in/module)
> > > if apple-gmux is being built.
> > 
> > apple_bl.h provides stubs for these functions when apple_bl is not
> > built, so this shouldn't be necessary. Are you encoutering a situation
> > that causes build problems?
> 
> Yes, I am. With CONFIG_BACKLIGHT_APPLE=m and CONFIG_APPLE_GMUX=y, I see
> the following error:
> 
>   LD      init/built-in.o
> drivers/built-in.o: In function `gmux_probe':
> apple-gmux.c:(.devinit.text+0xa769): undefined reference to `apple_bl_unregister'
> drivers/built-in.o: In function `gmux_remove':
> apple-gmux.c:(.devexit.text+0x46d): undefined reference to `apple_bl_register'

Yuck. In that case I don't think your patch probably goes far enough to
fix your situation.

As far as I know select isn't recursive, i.e. it won't select the
dependencies of the thing you select. 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] apple-gmux: Correctly depend on apple_bl for building
  2012-06-28 13:48     ` Seth Forshee
@ 2012-06-28 13:50       ` Seth Forshee
  2012-06-28 13:51       ` Arun Raghavan
  1 sibling, 0 replies; 7+ messages in thread
From: Seth Forshee @ 2012-06-28 13:50 UTC (permalink / raw)
  To: Arun Raghavan, Matthew Garrett, platform-driver-x86, linux-kernel

On Thu, Jun 28, 2012 at 08:48:06AM -0500, Seth Forshee wrote:
> On Thu, Jun 28, 2012 at 06:53:35PM +0530, Arun Raghavan wrote:
> > On Thu, 2012-06-28 at 08:20 -0500, Seth Forshee wrote:
> > > On Thu, Jun 28, 2012 at 04:06:36PM +0530, Arun Raghavan wrote:
> > > > apple_bl_register/unregister() are unconditionally used now, so we need
> > > > to make sure that apple_bl is selected appropriately (built-in/module)
> > > > if apple-gmux is being built.
> > > 
> > > apple_bl.h provides stubs for these functions when apple_bl is not
> > > built, so this shouldn't be necessary. Are you encoutering a situation
> > > that causes build problems?
> > 
> > Yes, I am. With CONFIG_BACKLIGHT_APPLE=m and CONFIG_APPLE_GMUX=y, I see
> > the following error:
> > 
> >   LD      init/built-in.o
> > drivers/built-in.o: In function `gmux_probe':
> > apple-gmux.c:(.devinit.text+0xa769): undefined reference to `apple_bl_unregister'
> > drivers/built-in.o: In function `gmux_remove':
> > apple-gmux.c:(.devexit.text+0x46d): undefined reference to `apple_bl_register'
> 
> Yuck. In that case I don't think your patch probably goes far enough to
> fix your situation.
> 
> As far as I know select isn't recursive, i.e. it won't select the
> dependencies of the thing you select. 

Oops, I accidentally sent this before I was done writing it.

I want to play with this a bit more, because it looks like there are
other scenarios that could be problematic. So I'll respond again once
I've had a chance to do that.

Seth


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] apple-gmux: Correctly depend on apple_bl for building
  2012-06-28 13:48     ` Seth Forshee
  2012-06-28 13:50       ` Seth Forshee
@ 2012-06-28 13:51       ` Arun Raghavan
  2012-06-28 15:15         ` Seth Forshee
  1 sibling, 1 reply; 7+ messages in thread
From: Arun Raghavan @ 2012-06-28 13:51 UTC (permalink / raw)
  To: Seth Forshee; +Cc: Matthew Garrett, platform-driver-x86, linux-kernel

On Thu, 2012-06-28 at 08:48 -0500, Seth Forshee wrote:
> On Thu, Jun 28, 2012 at 06:53:35PM +0530, Arun Raghavan wrote:
> > On Thu, 2012-06-28 at 08:20 -0500, Seth Forshee wrote:
> > > On Thu, Jun 28, 2012 at 04:06:36PM +0530, Arun Raghavan wrote:
> > > > apple_bl_register/unregister() are unconditionally used now, so we need
> > > > to make sure that apple_bl is selected appropriately (built-in/module)
> > > > if apple-gmux is being built.
> > > 
> > > apple_bl.h provides stubs for these functions when apple_bl is not
> > > built, so this shouldn't be necessary. Are you encoutering a situation
> > > that causes build problems?
> > 
> > Yes, I am. With CONFIG_BACKLIGHT_APPLE=m and CONFIG_APPLE_GMUX=y, I see
> > the following error:
> > 
> >   LD      init/built-in.o
> > drivers/built-in.o: In function `gmux_probe':
> > apple-gmux.c:(.devinit.text+0xa769): undefined reference to `apple_bl_unregister'
> > drivers/built-in.o: In function `gmux_remove':
> > apple-gmux.c:(.devexit.text+0x46d): undefined reference to `apple_bl_register'
> 
> Yuck. In that case I don't think your patch probably goes far enough to
> fix your situation.
> 
> As far as I know select isn't recursive, i.e. it won't select the
> dependencies of the thing you select. 

I missed the stubs, so the patch should probably just be adding this
line:

depends on APPLE_BACKLIGHT = n || APPLE_BACKLIGHT

but that conflicts with the 'select BACKLIGHT_CLASS_DEVICE' (a recursive
dependency is detected).

-- Arun


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] apple-gmux: Correctly depend on apple_bl for building
  2012-06-28 13:51       ` Arun Raghavan
@ 2012-06-28 15:15         ` Seth Forshee
  0 siblings, 0 replies; 7+ messages in thread
From: Seth Forshee @ 2012-06-28 15:15 UTC (permalink / raw)
  To: Arun Raghavan; +Cc: Matthew Garrett, platform-driver-x86, linux-kernel

On Thu, Jun 28, 2012 at 07:21:11PM +0530, Arun Raghavan wrote:
> I missed the stubs, so the patch should probably just be adding this
> line:
> 
> depends on APPLE_BACKLIGHT = n || APPLE_BACKLIGHT
> 
> but that conflicts with the 'select BACKLIGHT_CLASS_DEVICE' (a recursive
> dependency is detected).

Sigh. We have a similar situation with acpi_video, which undoubtedly
also affects some other drivers as well.

This is the best I've been able to come up with.

   depends on BACKLIGHT_CLASS_DEVICE
   depends on BACKLIGHT_APPLE=n || BACKLIGHT_APPLE
   depends on ACPI_VIDEO=n || ACPI_VIDEO

This at least keeps it from being built-in if it's going to be linking
against symbols provided by a module. I'm definitely open to other
suggestions though.

Seth


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-06-28 15:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-28 10:36 [PATCH] apple-gmux: Correctly depend on apple_bl for building Arun Raghavan
2012-06-28 13:20 ` Seth Forshee
2012-06-28 13:23   ` Arun Raghavan
2012-06-28 13:48     ` Seth Forshee
2012-06-28 13:50       ` Seth Forshee
2012-06-28 13:51       ` Arun Raghavan
2012-06-28 15:15         ` Seth Forshee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox