From: Sascha Hauer <s.hauer@pengutronix.de>
To: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] ATA: Implement a hook for 'devinfo'
Date: Thu, 28 Apr 2016 16:34:34 +0200 [thread overview]
Message-ID: <20160428143434.GD7860@pengutronix.de> (raw)
In-Reply-To: <1461767893-13103-1-git-send-email-andrew.smirnov@gmail.com>
On Wed, Apr 27, 2016 at 07:38:13AM -0700, Andrey Smirnov wrote:
> Implement simple adapter function to serve as a hook for 'devinfo'
> command.
>
> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> ---
> drivers/ata/disk_ata_drive.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
Applied, thanks
Sascha
>
> diff --git a/drivers/ata/disk_ata_drive.c b/drivers/ata/disk_ata_drive.c
> index d30d0ad..9b3730c 100644
> --- a/drivers/ata/disk_ata_drive.c
> +++ b/drivers/ata/disk_ata_drive.c
> @@ -303,6 +303,14 @@ static int ata_detect(struct device_d *dev)
> return ata_port_detect(port);
> }
>
> +static void ata_info(struct device_d *dev)
> +{
> + struct ata_port *port = container_of(dev, struct ata_port, class_dev);
> +
> + if (port->initialized)
> + ata_dump_id(port->id);
> +}
> +
> /**
> * Register an ATA drive behind an IDE like interface
> * @param dev The interface device
> @@ -322,6 +330,7 @@ int ata_port_register(struct ata_port *port)
> }
>
> port->class_dev.parent = port->dev;
> + port->class_dev.info = ata_info;
> port->class_dev.detect = ata_detect;
>
> ret = register_device(&port->class_dev);
> --
> 2.5.5
>
>
> _______________________________________________
> 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
prev parent reply other threads:[~2016-04-28 14:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-27 14:38 Andrey Smirnov
2016-04-28 14:34 ` 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=20160428143434.GD7860@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=andrew.smirnov@gmail.com \
--cc=barebox@lists.infradead.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