mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Hubert Feurstein <h.feurstein@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [RFC PATCH 1/3] spi: add platform_data pointer to spi_board_info
Date: Tue, 21 Jun 2011 13:57:23 +0200	[thread overview]
Message-ID: <20110621115723.GX23771@pengutronix.de> (raw)
In-Reply-To: <1308606394-7510-1-git-send-email-h.feurstein@gmail.com>

Applied this series to -next.

Sascha

On Mon, Jun 20, 2011 at 11:46:32PM +0200, Hubert Feurstein wrote:
> In the spi layer this pointer will be assigned to the
> platform_data pointer of the new spi device, thus it can
> be accessed in the drivers 'probe' handler.
> 
> Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
> ---
>  drivers/spi/spi.c |    1 +
>  include/spi/spi.h |    4 ++--
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
> index 4560259..588c263 100644
> --- a/drivers/spi/spi.c
> +++ b/drivers/spi/spi.c
> @@ -75,6 +75,7 @@ struct spi_device *spi_new_device(struct spi_master *master,
>  	proxy->chip_select = chip->chip_select;
>  	proxy->max_speed_hz = chip->max_speed_hz;
>  	proxy->mode = chip->mode;
> +	proxy->dev.platform_data = chip->platform_data;
>  	strcpy(proxy->dev.name, chip->name);
>  	proxy->dev.type_data = proxy;
>  	status = register_device(&proxy->dev);
> diff --git a/include/spi/spi.h b/include/spi/spi.h
> index 8dce8db..c76f3b7 100644
> --- a/include/spi/spi.h
> +++ b/include/spi/spi.h
> @@ -14,8 +14,8 @@ struct spi_board_info {
>  	/* mode becomes spi_device.mode, and is essential for chips
>  	 * where the default of SPI_CS_HIGH = 0 is wrong.
>  	 */
> -	u8		mode;
> -
> +	u8	mode;
> +	void	*platform_data;
>  };
>  
>  /**
> -- 
> 1.7.4.1
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      parent reply	other threads:[~2011-06-21 11:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-20 21:46 Hubert Feurstein
2011-06-20 21:46 ` [RFC PATCH 2/3] spi: add more spi transfer functions Hubert Feurstein
2011-06-23 19:47   ` Franck JULLIEN
2011-06-24 13:12     ` Hubert Feurstein
     [not found]       ` <BANLkTin9gmGY+CApY98wEX_qTkoAgKcU6A@mail.gmail.com>
2011-06-24 13:43         ` Fwd: " Franck JULLIEN
2011-06-20 21:46 ` [RFC PATCH 3/3] eeprom: add at25 eeprom driver Hubert Feurstein
2011-06-21 11:57 ` Sascha Hauer [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=20110621115723.GX23771@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=h.feurstein@gmail.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