public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Daniel Drake <dsd@laptop.org>
Cc: tglx@linutronix.de, mingo@redhat.com, x86@kernel.org,
	mjg@redhat.com, linux-kernel@vger.kernel.org,
	dilinger@queued.net
Subject: Re: [PATCH] OLPC: register XO-1 RF kill device
Date: Mon, 04 Oct 2010 10:43:35 -0700	[thread overview]
Message-ID: <4CAA1247.2050408@zytor.com> (raw)
In-Reply-To: <20101004171419.E3F3E9D401B@zog.reactivated.net>

On 10/04/2010 10:14 AM, Daniel Drake wrote:
> The upcoming XO-1 rfkill driver (for drivers/platform/x86) will register
> itself with the name "xo1-rfkill"
> 
> Add the necessary mechanics so that this is properly probed and
> initialized on XO-1 laptops.
> 
> Signed-off-by: Daniel Drake <dsd@laptop.org>
> ---
>  arch/x86/kernel/olpc.c |   10 ++++++++++
>  1 files changed, 10 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/x86/kernel/olpc.c b/arch/x86/kernel/olpc.c
> index 37c49934..d57f26a 100644
> --- a/arch/x86/kernel/olpc.c
> +++ b/arch/x86/kernel/olpc.c
> @@ -17,6 +17,7 @@
>  #include <linux/spinlock.h>
>  #include <linux/io.h>
>  #include <linux/string.h>
> +#include <linux/platform_device.h>
>  
>  #include <asm/geode.h>
>  #include <asm/setup.h>
> @@ -248,6 +249,15 @@ static int __init olpc_init(void)
>  			olpc_platform_info.boardrev >> 4,
>  			olpc_platform_info.ecver);
>  
> +	if (olpc_platform_info.boardrev < olpc_board_pre(0xd0)) { /* XO-1 */
> +		struct platform_device *pdev;
> +
> +		/* register any relevant platform devices */
> +		pdev = platform_device_register_simple("xo1-rfkill", -1, NULL, 0);
> +		if (IS_ERR(pdev))
> +			return PTR_ERR(pdev);
> +	}
> +
>  	return 0;
>  }
>  

Please put this in a separate file, or at least a separate function
(adding all the XO-1 platform devices.)

	-hpa

      reply	other threads:[~2010-10-04 17:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-04 17:14 [PATCH] OLPC: register XO-1 RF kill device Daniel Drake
2010-10-04 17:43 ` H. Peter Anvin [this message]

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=4CAA1247.2050408@zytor.com \
    --to=hpa@zytor.com \
    --cc=dilinger@queued.net \
    --cc=dsd@laptop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mjg@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@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