Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1516697

Re: [PATCH] tile-srom: allow the driver to be built as a module

From Paul Gortmaker <paul.gortmaker@windriver.com>
Newsgroups linux.kernel
Subject Re: [PATCH] tile-srom: allow the driver to be built as a module
Date 2016-11-08 01:20 +0100
Message-ID <sB2iR-23v-7@gated-at.bofh.it> (permalink)
References <syp2h-5zh-29@gated-at.bofh.it> <sAZl0-8k-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[[PATCH] tile-srom: allow the driver to be built as a module] On 07/11/2016 (Mon 15:56) Chris Metcalf wrote:

> The code was already configured that way, but the Kconfig
> file didn't support requesting it.
> 
> A buglet caused a null pointer deref when unloading the
> module, but this commit also corrects that issue.
> 
> Signed-off-by: Chris Metcalf <cmetcalf@mellanox.com>
> ---
> This is in response to Paul's patch (see the in-reply-to) suggesting
> we remove the module infrastructure from the code instead.

Fine by me; I have to default to keeping the code consistent with the
way it used to be, but people who want modular use cases and can test
those are welcome to extend the functionality accordingly.  In the end
I just want the code to be consistent with the Makefile/Kconfig.

Thanks,
Paul.
--

> 
> I can push this via the tile tree since it's a tile-only device,
> or Greg, if you'd prefer to take it via your tree, that's fine too.
> 
>  drivers/char/Kconfig     | 2 +-
>  drivers/char/tile-srom.c | 3 ++-
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
> index dcc09739a54e..70124ca5c33d 100644
> --- a/drivers/char/Kconfig
> +++ b/drivers/char/Kconfig
> @@ -578,7 +578,7 @@ config DEVPORT
>  source "drivers/s390/char/Kconfig"
>  
>  config TILE_SROM
> -	bool "Character-device access via hypervisor to the Tilera SPI ROM"
> +	tristate "Character-device access via hypervisor to the Tilera SPI ROM"
>  	depends on TILE
>  	default y
>  	---help---
> diff --git a/drivers/char/tile-srom.c b/drivers/char/tile-srom.c
> index 398800edb2cc..3d4cca64b2d4 100644
> --- a/drivers/char/tile-srom.c
> +++ b/drivers/char/tile-srom.c
> @@ -312,7 +312,8 @@ ATTRIBUTE_GROUPS(srom_dev);
>  
>  static char *srom_devnode(struct device *dev, umode_t *mode)
>  {
> -	*mode = S_IRUGO | S_IWUSR;
> +	if (mode)
> +		*mode = 0644;
>  	return kasprintf(GFP_KERNEL, "srom/%s", dev_name(dev));
>  }
>  
> -- 
> 2.7.2
> 

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] char: make tile-srom explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-10-31 19:00 +0100
  [PATCH] tile-srom: allow the driver to be built as a module Chris Metcalf <cmetcalf@mellanox.com> - 2016-11-07 22:10 +0100
    Re: [PATCH] tile-srom: allow the driver to be built as a module Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-11-08 01:20 +0100
    Re: [PATCH] tile-srom: allow the driver to be built as a module Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-10 15:20 +0100

csiph-web