Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: Markos Chandras <markos.chandras@imgtec.com>
Cc: linux-mips@linux-mips.org
Subject: Re: [PATCH 3/3] MIPS: sead3: Only build the led driver if LEDS_CLASS is enabled
Date: Fri, 24 Oct 2014 01:54:16 +0200	[thread overview]
Message-ID: <20141023235416.GA7529@linux-mips.org> (raw)
In-Reply-To: <1412847261-7930-4-git-send-email-markos.chandras@imgtec.com>

On Thu, Oct 09, 2014 at 10:34:21AM +0100, Markos Chandras wrote:

> leds-sead3.c:(.text+0x7dc): undefined reference to `led_classdev_unregister'
> leds-sead3.c:(.text+0x7e8): undefined reference to `led_classdev_unregister'
> 
> Reviewed-by: Steven J. Hill <Steven.Hill@imgtec.com>
> Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>

Hmm...  I think there's a whole lot more broken.  Let's start with the
Makefile:

-obj-y				+= leds-sead3.o sead3-leds.o

Very creative filenames.  No way to know in what way foo-bar and bar-foo
are different.  But let's take a look at sead3-leds:

[...]
module_init(led_init);

MODULE_AUTHOR("Chris Dearman <chris@mips.com>");
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("LED probe driver for SEAD-3");

But although you were trying to make this a module, this better shouldn't
be one, the devices should always be registered if they're there, driver
enabled or not.

Anyway this should probably become a device_initcall() and all the
module bits should go.

And now let's take a look at sead3-led..  oh wait, that's leds-sead3 -
did I bitch about the filename before?  That's a complete device driver
and it blows up primarily because it lives in a directory where it
shouldn't be at all.

  Ralf

  parent reply	other threads:[~2014-10-23 23:54 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-09  9:34 [PATCH 0/3] Malta/SEAD3 kernel image size patches for 3.18 Markos Chandras
2014-10-09  9:34 ` Markos Chandras
2014-10-09  9:34 ` [PATCH 1/3] MIPS: Malta: Do not build the malta-amon.c file if CMP is not enabled Markos Chandras
2014-10-09  9:34   ` Markos Chandras
2014-10-09  9:34 ` [PATCH 2/3] MIPS: sead3: Build the I2C related devices if CONFIG_I2C is enabled Markos Chandras
2014-10-09  9:34   ` Markos Chandras
2014-10-23 18:19   ` Ralf Baechle
2014-10-24  8:15     ` Ralf Baechle
2014-10-24 10:06       ` [PATCH] MIPS: SEAD3: Nuke unused sead3-pic32-i2c-drv Ralf Baechle
2014-10-24 12:26     ` [PATCH] MIPS/I2C: Move SEAD3 I2C driver to where it belongs Ralf Baechle
2014-11-13  8:24       ` Wolfram Sang
2014-10-09  9:34 ` [PATCH 3/3] MIPS: sead3: Only build the led driver if LEDS_CLASS is enabled Markos Chandras
2014-10-09  9:34   ` Markos Chandras
2014-10-23 23:54   ` Ralf Baechle [this message]
2014-10-23 22:41     ` [PATCH 1/3] MIPS: SEAD3: Fix LED device registration Ralf Baechle
2014-10-23 23:32     ` [PATCH 2/3] MIPS: SEAD3: Collect LED platform device registration in a single file Ralf Baechle
2014-10-23 23:50     ` [PATCH 3/3] LED/MIPS: Move SEAD3 LED driver to where it belongs Ralf Baechle
2014-10-24 23:19       ` Bryan Wu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141023235416.GA7529@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=linux-mips@linux-mips.org \
    --cc=markos.chandras@imgtec.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox