public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-media@vger.kernel.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH v1 1/2] media: atomisp: Put PMIC device after getting its I²C address
Date: Wed, 10 Apr 2024 12:41:14 +0200	[thread overview]
Message-ID: <282cc68b-3730-4e8c-94cb-e4013159fad2@redhat.com> (raw)
In-Reply-To: <20240326202813.1425431-2-andriy.shevchenko@linux.intel.com>

Hi,

On 3/26/24 9:27 PM, Andy Shevchenko wrote:
> We don't use the PMIC I²C client device after getting its address.
> Drop the reference to it. We do not expect device to disappear
> as it should be taken care by the OpRegion drivers.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Thank you for your patch.

I have merged this in my media-atomisp branch:
https://git.kernel.org/pub/scm/linux/kernel/git/hansg/linux.git/log/?h=media-atomisp

And this patch will be included in my next
pull-request to Mauro (to media subsystem maintainer)

Regards,

Hans



> ---
>  .../media/atomisp/pci/atomisp_gmin_platform.c       | 13 ++++++++-----
>  1 file changed, 8 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c b/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c
> index 139ad7ad1dcf..80aa2211cdc3 100644
> --- a/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c
> +++ b/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c
> @@ -497,16 +497,19 @@ static u8 gmin_get_pmic_id_and_addr(struct device *dev)
>  	if (pmic_id)
>  		return pmic_i2c_addr;
>  
> -	if (gmin_i2c_dev_exists(dev, PMIC_ACPI_TI, &power))
> +	if (gmin_i2c_dev_exists(dev, PMIC_ACPI_TI, &power)) {
>  		pmic_id = PMIC_TI;
> -	else if (gmin_i2c_dev_exists(dev, PMIC_ACPI_AXP, &power))
> +	} else if (gmin_i2c_dev_exists(dev, PMIC_ACPI_AXP, &power)) {
>  		pmic_id = PMIC_AXP;
> -	else if (gmin_i2c_dev_exists(dev, PMIC_ACPI_CRYSTALCOVE, &power))
> +	} else if (gmin_i2c_dev_exists(dev, PMIC_ACPI_CRYSTALCOVE, &power)) {
>  		pmic_id = PMIC_CRYSTALCOVE;
> -	else
> +	} else {
>  		pmic_id = PMIC_REGULATOR;
> +		return 0;
> +	}
>  
> -	pmic_i2c_addr = power ? power->addr : 0;
> +	pmic_i2c_addr = power->addr;
> +	put_device(&power->dev);
>  	return pmic_i2c_addr;
>  }
>  


  reply	other threads:[~2024-04-10 10:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-26 20:27 [PATCH v1 0/2] media: atomisp: Fix and refactor PMIC I²C discovery Andy Shevchenko
2024-03-26 20:27 ` [PATCH v1 1/2] media: atomisp: Put PMIC device after getting its I²C address Andy Shevchenko
2024-04-10 10:41   ` Hans de Goede [this message]
2024-03-26 20:27 ` [PATCH v1 2/2] media: atomisp: Replace open-coded i2c_find_device_by_fwnode() Andy Shevchenko
2024-04-10 10:35   ` Hans de Goede
2024-04-10 13:35     ` Andy Shevchenko
2024-04-10 13:41       ` Hans de Goede
2024-04-10 13:49         ` 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=282cc68b-3730-4e8c-94cb-e4013159fad2@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.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