linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Maximilian Luz <luzmaximilian@gmail.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Hans de Goede <hdegoede@redhat.com>,
	Lee Jones <lee.jones@linaro.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org,
	platform-driver-x86@vger.kernel.org,
	linux-serial@vger.kernel.org
Cc: Marcel Holtmann <marcel@holtmann.org>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
	Mark Gross <mgross@linux.intel.com>,
	Rob Herring <robh@kernel.org>, Jiri Slaby <jirislaby@kernel.org>
Subject: Re: [PATCH v1 2/5] platform/surface: aggregator: Use serdev_acpi_get_uart_resource() helper
Date: Tue, 3 Aug 2021 21:47:09 +0200	[thread overview]
Message-ID: <ae6b9e16-7036-ed23-1fd8-9b10627a8737@gmail.com> (raw)
In-Reply-To: <20210803192905.72246-2-andriy.shevchenko@linux.intel.com>

On 8/3/21 9:29 PM, Andy Shevchenko wrote:
> serdev provides a generic helper to get UART Serial Bus resources.
> Use it instead of open coded variant.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Thanks! Looks good to me.

Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com>

> ---
>   drivers/platform/surface/aggregator/core.c | 9 +--------
>   1 file changed, 1 insertion(+), 8 deletions(-)
> 
> diff --git a/drivers/platform/surface/aggregator/core.c b/drivers/platform/surface/aggregator/core.c
> index 279d9df19c01..c61bbeeec2df 100644
> --- a/drivers/platform/surface/aggregator/core.c
> +++ b/drivers/platform/surface/aggregator/core.c
> @@ -301,20 +301,13 @@ static acpi_status ssam_serdev_setup_via_acpi_crs(struct acpi_resource *rsc,
>   						  void *ctx)
>   {
>   	struct serdev_device *serdev = ctx;
> -	struct acpi_resource_common_serialbus *serial;
>   	struct acpi_resource_uart_serialbus *uart;
>   	bool flow_control;
>   	int status = 0;
>   
> -	if (rsc->type != ACPI_RESOURCE_TYPE_SERIAL_BUS)
> +	if (!serdev_acpi_get_uart_resource(rsc, &uart))
>   		return AE_OK;
>   
> -	serial = &rsc->data.common_serial_bus;
> -	if (serial->type != ACPI_RESOURCE_SERIAL_TYPE_UART)
> -		return AE_OK;
> -
> -	uart = &rsc->data.uart_serial_bus;
> -
>   	/* Set up serdev device. */
>   	serdev_device_set_baudrate(serdev, uart->default_baud_rate);
>   
> 

  reply	other threads:[~2021-08-03 19:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-03 19:29 [PATCH v1 1/5] serdev: Split and export serdev_acpi_get_uart_resource() Andy Shevchenko
2021-08-03 19:29 ` [PATCH v1 2/5] platform/surface: aggregator: Use serdev_acpi_get_uart_resource() helper Andy Shevchenko
2021-08-03 19:47   ` Maximilian Luz [this message]
2021-08-03 19:29 ` [PATCH v1 3/5] Bluetooth: hci_bcm: " Andy Shevchenko
2021-08-04  8:12   ` Hans de Goede
2021-08-04  8:42     ` Andy Shevchenko
2021-08-04  9:35       ` Hans de Goede
2021-08-03 19:29 ` [PATCH v1 4/5] Bluetooth: hci_bcm: Use acpi_gpio_get_*_resource() helpers Andy Shevchenko
2021-08-04  8:04   ` Hans de Goede
2021-08-03 19:29 ` [PATCH v1 5/5] Bluetooth: hci_bcm: Fix kernel doc comments Andy Shevchenko
2021-08-03 20:04 ` [v1,1/5] serdev: Split and export serdev_acpi_get_uart_resource() bluez.test.bot
2021-08-03 20:32   ` Andy Shevchenko
2021-08-04  8:08 ` [PATCH v1 1/5] " Hans de Goede
2021-08-04 12:07   ` Andy Shevchenko

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=ae6b9e16-7036-ed23-1fd8-9b10627a8737@gmail.com \
    --to=luzmaximilian@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdegoede@redhat.com \
    --cc=jirislaby@kernel.org \
    --cc=johan.hedberg@gmail.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=mgross@linux.intel.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=robh@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;
as well as URLs for NNTP newsgroup(s).