From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933656AbeAXNTP (ORCPT ); Wed, 24 Jan 2018 08:19:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:54198 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933462AbeAXNTO (ORCPT ); Wed, 24 Jan 2018 08:19:14 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EBF0020B80 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=jhogan@kernel.org Date: Wed, 24 Jan 2018 13:18:49 +0000 From: James Hogan To: Jiaxun Yang Cc: Ralf Baechle , Huacai CHen , linux-mips@linux-mips.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v6 3/4] MIPS: Loongson64: Load platform device during boot Message-ID: <20180124131848.GD5446@saruman> References: <20171226032602.11417-1-jiaxun.yang@flygoat.com> <20171226032602.11417-4-jiaxun.yang@flygoat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="AkbCVLjbJ9qUtAXD" Content-Disposition: inline In-Reply-To: <20171226032602.11417-4-jiaxun.yang@flygoat.com> User-Agent: Mutt/1.7.2 (2016-11-26) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --AkbCVLjbJ9qUtAXD Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 >=20 > Signed-off-by: Jiaxun Yang > --- > 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 >=20 > diff --git a/arch/mips/loongson64/lemote-2f/Makefile b/arch/mips/loongson= 64/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 > # > =20 > -obj-y +=3D clock.o machtype.o irq.o reset.o ec_kb3310b.o > +obj-y +=3D clock.o machtype.o irq.o reset.o ec_kb3310b.o platform.o > =20 > # > # Suspend Support > diff --git a/arch/mips/loongson64/lemote-2f/platform.c b/arch/mips/loongs= on64/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 */ > +/*=20 Trailing whitespace > +* Copyright (C) 2017 Jiaxun Yang > +* > +*/ Checkpatch complains about missing spaces to align the '*' on each line of this block comment. Cheers James > + > +#include > +#include > + > +#include > + > +static struct platform_device yeeloong_pdev =3D { > + .name =3D "yeeloong_laptop", > + .id =3D -1, > +}; > + > +static int __init lemote2f_platform_init(void) > +{ > + if (mips_machtype !=3D MACH_LEMOTE_YL2F89) > + return -ENODEV; > + > + return platform_device_register(&yeeloong_pdev); > +} > + > +arch_initcall(lemote2f_platform_init); > --=20 > 2.15.1 >=20 --AkbCVLjbJ9qUtAXD Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEd80NauSabkiESfLYbAtpk944dnoFAlpoh7IACgkQbAtpk944 dnq8NA/+OfLE3rYTZuiHGYcabBMAXWLaoBZzCHH5mXtkLB93f+yRS2hl3blKSD/8 wNPmxcoHgIchI8LfJDNnPEkaKp7sb+5OX/NcuyryMP80HQn0H5t/j+MGUSwIhCh8 179DNk1ZHJN0VrOYrggHrormhPz6Kw/SpJzHamoN4g33aTj512pokhRjz6DFnR2X sN1lMdEeZvgjSRqagkyQ9QPdy7FD7Bqvs6BC4YnltPFlcLhjuixAYP4W1E40TVEU +vt8i5p8VfswRL+XlQrIXdntM/YHw4gs75hGUmASLCwGazRQY7bqlFz9fNlwuPH5 kQb52goBT3ri2+QDbSwPF1NARf3hB2H9LTrjaadjY7GPM6l1LLjdD2zE0dPplNeI /KMmuxUyVKd4hkodprmOl2GPw8YhZzTHqRgjMrT13om37v5s/aNVHdSWk71pm529 BjKlOv4S8Fqy1fc8Fz1EtlX6SZsbE6FNPRdnbvGfNGylIP7RpHmfoU6oS4fWr/bv CVooxtbrnoO5CJleTZqh5JwH29+rDCOMG0N9YoemW4GIRN8JAkujmaQvcpLlUclF s1KhjzoqEu338i8Zg+gVBgVEr/I1DsUtLaTu+NuMfj8zbPPOj7NSGNDdCvSsiggH 1XxBIUY2L017tJDxkxWjiEOjR10xq6thISngqZSCu9qi66IiCPY= =7gFH -----END PGP SIGNATURE----- --AkbCVLjbJ9qUtAXD--