All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Hogan <jhogan@kernel.org>
To: Jiaxun Yang <jiaxun.yang@flygoat.com>
Cc: Ralf Baechle <ralf@linux-mips.org>,
	Huacai CHen <chenhc@lemote.com>,
	linux-mips@linux-mips.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 3/4] MIPS: Loongson64: Load platform device during boot
Date: Wed, 24 Jan 2018 13:18:49 +0000	[thread overview]
Message-ID: <20180124131848.GD5446@saruman> (raw)
In-Reply-To: <20171226032602.11417-4-jiaxun.yang@flygoat.com>

[-- Attachment #1: Type: text/plain, Size: 1935 bytes --]

On Tue, Dec 26, 2017 at 11:26:01AM +0800, Jiaxun Yang wrote:
> This patch just add pdev during boot to load the platform driver
> 
> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
> ---
>  arch/mips/loongson64/lemote-2f/Makefile   |  2 +-
>  arch/mips/loongson64/lemote-2f/platform.c | 25 +++++++++++++++++++++++++
>  2 files changed, 26 insertions(+), 1 deletion(-)
>  create mode 100644 arch/mips/loongson64/lemote-2f/platform.c
> 
> diff --git a/arch/mips/loongson64/lemote-2f/Makefile b/arch/mips/loongson64/lemote-2f/Makefile
> index 08b8abcbfef5..31c90737b98c 100644
> --- a/arch/mips/loongson64/lemote-2f/Makefile
> +++ b/arch/mips/loongson64/lemote-2f/Makefile
> @@ -2,7 +2,7 @@
>  # Makefile for lemote loongson2f family machines
>  #
>  
> -obj-y += clock.o machtype.o irq.o reset.o ec_kb3310b.o
> +obj-y += clock.o machtype.o irq.o reset.o ec_kb3310b.o platform.o
>  
>  #
>  # Suspend Support
> diff --git a/arch/mips/loongson64/lemote-2f/platform.c b/arch/mips/loongson64/lemote-2f/platform.c
> new file mode 100644
> index 000000000000..e0007f6c456a
> --- /dev/null
> +++ b/arch/mips/loongson64/lemote-2f/platform.c
> @@ -0,0 +1,25 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/* 

Trailing whitespace

> +* Copyright (C) 2017 Jiaxun Yang <jiaxun.yang@flygoat.com>
> +*
> +*/

Checkpatch complains about missing spaces to align the '*' on each line
of this block comment.

Cheers
James

> +
> +#include <linux/err.h>
> +#include <linux/platform_device.h>
> +
> +#include <asm/bootinfo.h>
> +
> +static struct platform_device yeeloong_pdev = {
> +	.name = "yeeloong_laptop",
> +	.id = -1,
> +};
> +
> +static int __init lemote2f_platform_init(void)
> +{
> +	if (mips_machtype != MACH_LEMOTE_YL2F89)
> +		return -ENODEV;
> +
> +	return platform_device_register(&yeeloong_pdev);
> +}
> +
> +arch_initcall(lemote2f_platform_init);
> -- 
> 2.15.1
> 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2018-01-24 13:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-26  3:25 Add YeeLoong support v6 Jiaxun Yang
2017-12-26  3:25 ` [PATCH v6 1/4] MIPS: Loongson64: lemote-2f move ec_kb3310b.h to include dir and clean up Jiaxun Yang
2018-01-24 11:49   ` James Hogan
2017-12-26  3:26 ` [PATCH v6 2/4] MIPS: Loongson64: Yeeloong add platform driver Jiaxun Yang
2018-01-24 11:58   ` James Hogan
2017-12-26  3:26 ` [PATCH v6 3/4] MIPS: Loongson64: Load platform device during boot Jiaxun Yang
2018-01-24 13:18   ` James Hogan [this message]
2017-12-26  3:26 ` [PATCH v6 4/4] MAINTAINERS: Add entry for Lemote YeeLoong Extra Driver Jiaxun Yang

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=20180124131848.GD5446@saruman \
    --to=jhogan@kernel.org \
    --cc=chenhc@lemote.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.