mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Samuel Iglesias Gonsálvez" <siglesias@igalia.com>
To: "Uwe Kleine-König" <uwe@kleine-koenig.org>,
	"Jens Taprogge" <jens.taprogge@taprogge.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, industrypack-devel@lists.sourceforge.net
Subject: Re: [Industrypack-devel] [PATCH v1 1/2] ipack: Fail earlier for drivers without probe function
Date: Tue, 09 Feb 2021 09:40:12 +0100	[thread overview]
Message-ID: <e86534902fce9b82d2a69b7ec24e697b43c9ef6f.camel@igalia.com> (raw)
In-Reply-To: <20210207215556.96371-1-uwe@kleine-koenig.org>

[-- Attachment #1: Type: text/plain, Size: 1771 bytes --]

Hi Uwe,

Thanks for the patches!

Patch series is,

Acked-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>

Greg, Would you mind picking this patch series through your char-misc
tree?

Thanks!

Sam

On Sun, 2021-02-07 at 22:55 +0100, Uwe Kleine-König wrote:
> A driver without a probe function isn't useful as it can never be
> used.
> Let registering such a driver fail already instead of failing every
> binding.
> 
> This is only cosmetic as there is no ipack driver without a probe
> function.
> 
> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
> ---
>  drivers/ipack/ipack.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/ipack/ipack.c b/drivers/ipack/ipack.c
> index 9267a85fee18..eabc4d08792a 100644
> --- a/drivers/ipack/ipack.c
> +++ b/drivers/ipack/ipack.c
> @@ -64,9 +64,6 @@ static int ipack_bus_probe(struct device *device)
>         struct ipack_device *dev = to_ipack_dev(device);
>         struct ipack_driver *drv = to_ipack_driver(device->driver);
>  
> -       if (!drv->ops->probe)
> -               return -EINVAL;
> -
>         return drv->ops->probe(dev);
>  }
>  
> @@ -252,6 +249,9 @@ EXPORT_SYMBOL_GPL(ipack_bus_unregister);
>  int ipack_driver_register(struct ipack_driver *edrv, struct module
> *owner,
>                           const char *name)
>  {
> +       if (!edrv->ops->probe)
> +               return -EINVAL;
> +
>         edrv->driver.owner = owner;
>         edrv->driver.name = name;
>         edrv->driver.bus = &ipack_bus_type;
> 
> base-commit: 5c8fe583cce542aa0b84adc939ce85293de36e5e


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2021-02-09  9:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-07 21:55 Uwe Kleine-König
2021-02-07 21:55 ` [PATCH v1 2/2] ipack: Handle a driver without remove callback Uwe Kleine-König
2021-02-09  8:40 ` Samuel Iglesias Gonsálvez [this message]
2021-02-09  8:47   ` [Industrypack-devel] [PATCH v1 1/2] ipack: Fail earlier for drivers without probe function Greg Kroah-Hartman

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=e86534902fce9b82d2a69b7ec24e697b43c9ef6f.camel@igalia.com \
    --to=siglesias@igalia.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=industrypack-devel@lists.sourceforge.net \
    --cc=jens.taprogge@taprogge.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=uwe@kleine-koenig.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

all inboxes | Powered by JetHome®