aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/qlcnic
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/qlcnic')
-rw-r--r--drivers/net/qlcnic/qlcnic_main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c
index c334f1a0a2a4..4d1831350efa 100644
--- a/drivers/net/qlcnic/qlcnic_main.c
+++ b/drivers/net/qlcnic/qlcnic_main.c
@@ -3272,6 +3272,8 @@ qlcnic_create_diag_entries(struct qlcnic_adapter *adapter)
3272{ 3272{
3273 struct device *dev = &adapter->pdev->dev; 3273 struct device *dev = &adapter->pdev->dev;
3274 3274
3275 if (adapter->op_mode == QLCNIC_NON_PRIV_FUNC)
3276 return;
3275 if (device_create_file(dev, &dev_attr_diag_mode)) 3277 if (device_create_file(dev, &dev_attr_diag_mode))
3276 dev_info(dev, "failed to create diag_mode sysfs entry\n"); 3278 dev_info(dev, "failed to create diag_mode sysfs entry\n");
3277 if (device_create_bin_file(dev, &bin_attr_crb)) 3279 if (device_create_bin_file(dev, &bin_attr_crb))
@@ -3292,12 +3294,13 @@ qlcnic_create_diag_entries(struct qlcnic_adapter *adapter)
3292 3294
3293} 3295}
3294 3296
3295
3296static void 3297static void
3297qlcnic_remove_diag_entries(struct qlcnic_adapter *adapter) 3298qlcnic_remove_diag_entries(struct qlcnic_adapter *adapter)
3298{ 3299{
3299 struct device *dev = &adapter->pdev->dev; 3300 struct device *dev = &adapter->pdev->dev;
3300 3301
3302 if (adapter->op_mode == QLCNIC_NON_PRIV_FUNC)
3303 return;
3301 device_remove_file(dev, &dev_attr_diag_mode); 3304 device_remove_file(dev, &dev_attr_diag_mode);
3302 device_remove_bin_file(dev, &bin_attr_crb); 3305 device_remove_bin_file(dev, &bin_attr_crb);
3303 device_remove_bin_file(dev, &bin_attr_mem); 3306 device_remove_bin_file(dev, &bin_attr_mem);