public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: "Guan Xuetao" <gxt@mprc.pku.edu.cn>
Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
	"'Greg KH'" <greg@kroah.com>
Subject: Re: [PATCH 08/12] unicore32 machine related files: core files
Date: Thu, 17 Feb 2011 18:40:16 +0100	[thread overview]
Message-ID: <201102171840.16430.arnd@arndb.de> (raw)
In-Reply-To: <015101cbcdae$3b4fcc00$b1ef6400$@mprc.pku.edu.cn>

On Wednesday 16 February 2011, Guan Xuetao wrote:
> Message-Id: <15f7e89c92883a77c96f5f3288c9a4afbd68f8e3.1297842537.git.gxt@mprc.pku.edu.cn>
> In-Reply-To: <cover.1297842537.git.gxt@mprc.pku.edu.cn>
> References: <cover.1297842537.git.gxt@mprc.pku.edu.cn>
> From: GuanXuetao <gxt@mprc.pku.edu.cn>
> Date: Sat, 15 Jan 2011 18:24:16 +0800

These headers should not be here. When using git-send-email, this will be handled
automatically, but if you send the patch from a regular email client application,
you should remove them manually.
 
> diff --git a/arch/unicore32/Kconfig.puv3 b/arch/unicore32/Kconfig.puv3
> new file mode 100644
> index 0000000..2ef10db
> --- /dev/null
> +++ b/arch/unicore32/Kconfig.puv3
> @@ -0,0 +1,125 @@
> +#
> +# PKUnity v3 Kconfig
> +#
> +
> +if ARCH_PUV3
> +
> +menu "PKUnity v3 SoC Features"
> +
> +config PUV3_I2C
> +	bool "PKUnity v3 I2C bus support"
> +#	default y
> +	select I2C
> +	select I2C_CHARDEV
> +	select I2C_ALGOBIT
> +
> +config PUV3_UMAL
> +	tristate "PKUnity v3 UMAL Gigabit Network Adapter support"
> +	select MII
> +	select PHYLIB
> ...

Generally, everything in this file should be moved to other files.
The rule is that the Kconfig entry belongs into the same directory
as the Makefile referencing it. E.g. the two above should
be in drivers/i2c/busses/Kconfig and drivers/net/Kconfig, and in
the same patch as the actual device driver.

> +
> +static struct platform_device nb0916_device_gpio_button = {
> +	.name	= "gpio-keys",
> +	.id	= -1,
> +	.dev	= {
> +		.platform_data = &nb0916_gpio_button_data,
> +	},
> +};
> +
> +static struct platform_device *mach_nb0916_devices[] __initdata = {
> +	&puv3_device_i2c,
> +	&physmap_flash,
> +	&nb0916_device_backlight,
> +	&nb0916_device_gpio_button,
> +};

Static platform devices are no longer recommended. You can change these
to use platform_device_register_simple() or a variant of it.

If you plan to convert the entire architecture to use a flattened
device tree as we discussed in an earlier review, you don't need to
bother with this now, because the entire platform device registration
you have here can then be removed.

	Arnd

  reply	other threads:[~2011-02-17 17:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-16  7:50 [PATCH 08/12] unicore32 machine related files: core files Guan Xuetao
2011-02-17 17:40 ` Arnd Bergmann [this message]
2011-02-22 14:22   ` Guan Xuetao

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=201102171840.16430.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=greg@kroah.com \
    --cc=gxt@mprc.pku.edu.cn \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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