From: Ben Hutchings Date: Tue, 18 Jun 2013 16:45:40 +0000 (+0100) Subject: sfc: Remove write permission from phy_type attribute X-Git-Tag: android-x86-4.4-r1~540^2~26 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=776fbcc9cbece10756bdb67b48a0798e6446f16b;p=android-x86%2Fkernel.git sfc: Remove write permission from phy_type attribute Driver probe currently results in: WARNING: at drivers/base/core.c:576 device_create_file+0x57/0x7e() Attribute phy_type: write permission without 'store' Signed-off-by: Ben Hutchings Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c index 39e4cb39de29..4a14a940c65e 100644 --- a/drivers/net/ethernet/sfc/efx.c +++ b/drivers/net/ethernet/sfc/efx.c @@ -2139,7 +2139,7 @@ show_phy_type(struct device *dev, struct device_attribute *attr, char *buf) struct efx_nic *efx = pci_get_drvdata(to_pci_dev(dev)); return sprintf(buf, "%d\n", efx->phy_type); } -static DEVICE_ATTR(phy_type, 0644, show_phy_type, NULL); +static DEVICE_ATTR(phy_type, 0444, show_phy_type, NULL); static int efx_register_netdev(struct efx_nic *efx) {