diff options
author | Chris Metcalf <cmetcalf@mellanox.com> | 2016-11-07 21:56:37 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-11-10 15:18:56 +0100 |
commit | 71aeebff2c1153037fb900e17e1accb0f7812f36 (patch) | |
tree | 3196dd3470a8eab13c1fb5bfbdfbfdc32c79568f /drivers/char/tile-srom.c | |
parent | mei: enable to set the internal flag for client write (diff) | |
download | linux-71aeebff2c1153037fb900e17e1accb0f7812f36.tar.xz linux-71aeebff2c1153037fb900e17e1accb0f7812f36.zip |
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: Chris Metcalf <cmetcalf@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/char/tile-srom.c')
-rw-r--r-- | drivers/char/tile-srom.c | 3 |
1 files changed, 2 insertions, 1 deletions
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)); } |