All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: "Ricardo B. Marliere" <ricardo@marliere.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dio: make dio_bus_type const
Date: Mon, 12 Feb 2024 11:44:16 +0100	[thread overview]
Message-ID: <2024021249-attentive-entity-70d1@gregkh> (raw)
In-Reply-To: <20240211-bus_cleanup-dio-v1-1-02140fbc5289@marliere.net>

On Sun, Feb 11, 2024 at 12:40:16PM -0300, Ricardo B. Marliere wrote:
> Now that the driver core can properly handle constant struct bus_type,
> move the dio_bus_type variable to be a constant structure as well,
> placing it into read-only memory which can not be modified at runtime.
> 
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
> ---
>  drivers/dio/dio-driver.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/dio/dio-driver.c b/drivers/dio/dio-driver.c
> index 69c46935ffc7..2d9fa6011945 100644
> --- a/drivers/dio/dio-driver.c
> +++ b/drivers/dio/dio-driver.c
> @@ -123,7 +123,7 @@ static int dio_bus_match(struct device *dev, struct device_driver *drv)
>  }
>  
>  
> -struct bus_type dio_bus_type = {
> +const struct bus_type dio_bus_type = {
>  	.name	= "dio",
>  	.match	= dio_bus_match,
>  	.probe	= dio_device_probe,
> 

Don't you also have to change this in include/linux/dio.h?

thanks,

greg k-h

  reply	other threads:[~2024-02-12 10:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-11 15:40 [PATCH] dio: make dio_bus_type const Ricardo B. Marliere
2024-02-12 10:44 ` Greg Kroah-Hartman [this message]
2024-02-12 11:32   ` Ricardo B. Marliere

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=2024021249-attentive-entity-70d1@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ricardo@marliere.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.