[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK8P3a1ak3kXSXGbDMRTJdGStDJybxusq0vkqsjcWiG_kLWkRg@mail.gmail.com>
Date: Mon, 4 Mar 2019 22:12:02 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Oded Gabbay <oded.gabbay@...il.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Mike Rapoport <rppt@...ux.ibm.com>,
"Linux-Kernel@...r. Kernel. Org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] misc: habanalabs: avoid HWMON dependency
On Mon, Mar 4, 2019 at 9:21 PM Oded Gabbay <oded.gabbay@...il.com> wrote:
>
> On Mon, Mar 4, 2019 at 10:04 PM Arnd Bergmann <arnd@...db.de> wrote:
> >
> > When CONFIG_HWMON is disabled, we currently get a link error for this driver:
> >
> > ERROR: "hwmon_device_unregister" [drivers/misc/habanalabs/habanalabs.ko] undefined!
> > ERROR: "hwmon_device_register_with_info" [drivers/misc/habanalabs/habanalabs.ko] undefined!
> >
> > As the hardware monitoring is not a required part of the functionality,
> > make it possible to compile without HWMON by ignoring all that functionality
> > depending on the configuration.
> Hi Arnd,
> I sent a patch to gkh to fix this last week (and he merged that into
> his tree), but I took a different approach of selecting HWMON in
> kconfig (with an added depends on of HAS_IOMEM to prevent dependency
> breakage).
> I don't really want the driver to load without HWMON support. I took
> the example from AMD's amdgpu driver which does the same thing.
Ok, that's fine, I see your fix now.
I tried to avoid doing this in Kconfig, as we already have a mix of 'depends on
HWMON' and 'select HWMON', which sooner or later is likely to cause
circular dependencies. Since you don't have any 'depends on' statements
so far, it's not a problem for you though.
Arnd
Powered by blists - more mailing lists