Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 71aeebff authored by Chris Metcalf's avatar Chris Metcalf Committed by Greg Kroah-Hartman
Browse files

tile-srom: allow the driver to be built as a module



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: default avatarChris Metcalf <cmetcalf@mellanox.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e0cb6b2f
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -577,7 +577,7 @@ config DEVPORT
source "drivers/s390/char/Kconfig"
source "drivers/s390/char/Kconfig"


config TILE_SROM
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
	depends on TILE
	default y
	default y
	---help---
	---help---
+2 −1
Original line number Original line Diff line number Diff line
@@ -312,7 +312,8 @@ ATTRIBUTE_GROUPS(srom_dev);


static char *srom_devnode(struct device *dev, umode_t *mode)
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));
	return kasprintf(GFP_KERNEL, "srom/%s", dev_name(dev));
}
}