aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2015-04-12 19:26:35 -0400
committerDavid Vrabel <david.vrabel@citrix.com>2015-04-29 12:34:50 -0400
commit8014bcc86ef112eab9ee1db312dba4e6b608cf89 (patch)
treeedb75ea07db0ae0fdd94c91d7c82c0eed94d5a76
parent2b953a5e994ce279904ec70220f7d4f31d380a0a (diff)
xen-pciback: Add name prefix to global 'permissive' variable
The variable for the 'permissive' module parameter used to be static but was recently changed to be extern. This puts it in the kernel global namespace if the driver is built-in, so its name should begin with a prefix identifying the driver. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Fixes: af6fc858a35b ("xen-pciback: limit guest control of command register") Signed-off-by: David Vrabel <david.vrabel@citrix.com>
-rw-r--r--drivers/xen/xen-pciback/conf_space.c6
-rw-r--r--drivers/xen/xen-pciback/conf_space.h2
-rw-r--r--drivers/xen/xen-pciback/conf_space_header.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/drivers/xen/xen-pciback/conf_space.c b/drivers/xen/xen-pciback/conf_space.c
index 75fe3d466515..9c234209d8b5 100644
--- a/drivers/xen/xen-pciback/conf_space.c
+++ b/drivers/xen/xen-pciback/conf_space.c
@@ -16,8 +16,8 @@
16#include "conf_space.h" 16#include "conf_space.h"
17#include "conf_space_quirks.h" 17#include "conf_space_quirks.h"
18 18
19bool permissive; 19bool xen_pcibk_permissive;
20module_param(permissive, bool, 0644); 20module_param_named(permissive, xen_pcibk_permissive, bool, 0644);
21 21
22/* This is where xen_pcibk_read_config_byte, xen_pcibk_read_config_word, 22/* This is where xen_pcibk_read_config_byte, xen_pcibk_read_config_word,
23 * xen_pcibk_write_config_word, and xen_pcibk_write_config_byte are created. */ 23 * xen_pcibk_write_config_word, and xen_pcibk_write_config_byte are created. */
@@ -262,7 +262,7 @@ int xen_pcibk_config_write(struct pci_dev *dev, int offset, int size, u32 value)
262 * This means that some fields may still be read-only because 262 * This means that some fields may still be read-only because
263 * they have entries in the config_field list that intercept 263 * they have entries in the config_field list that intercept
264 * the write and do nothing. */ 264 * the write and do nothing. */
265 if (dev_data->permissive || permissive) { 265 if (dev_data->permissive || xen_pcibk_permissive) {
266 switch (size) { 266 switch (size) {
267 case 1: 267 case 1:
268 err = pci_write_config_byte(dev, offset, 268 err = pci_write_config_byte(dev, offset,
diff --git a/drivers/xen/xen-pciback/conf_space.h b/drivers/xen/xen-pciback/conf_space.h
index 2e1d73d1d5d0..62461a8ba1d6 100644
--- a/drivers/xen/xen-pciback/conf_space.h
+++ b/drivers/xen/xen-pciback/conf_space.h
@@ -64,7 +64,7 @@ struct config_field_entry {
64 void *data; 64 void *data;
65}; 65};
66 66
67extern bool permissive; 67extern bool xen_pcibk_permissive;
68 68
69#define OFFSET(cfg_entry) ((cfg_entry)->base_offset+(cfg_entry)->field->offset) 69#define OFFSET(cfg_entry) ((cfg_entry)->base_offset+(cfg_entry)->field->offset)
70 70
diff --git a/drivers/xen/xen-pciback/conf_space_header.c b/drivers/xen/xen-pciback/conf_space_header.c
index c2260a0456c9..ad3d17d29c81 100644
--- a/drivers/xen/xen-pciback/conf_space_header.c
+++ b/drivers/xen/xen-pciback/conf_space_header.c
@@ -118,7 +118,7 @@ static int command_write(struct pci_dev *dev, int offset, u16 value, void *data)
118 118
119 cmd->val = value; 119 cmd->val = value;
120 120
121 if (!permissive && (!dev_data || !dev_data->permissive)) 121 if (!xen_pcibk_permissive && (!dev_data || !dev_data->permissive))
122 return 0; 122 return 0;
123 123
124 /* Only allow the guest to control certain bits. */ 124 /* Only allow the guest to control certain bits. */