priv->msg_buffers = NULL;
}
-static ssize_t show_pci(struct device *d, char *buf)
+static ssize_t show_pci(struct device *d, struct device_attribute *attr,
+ char *buf)
{
struct pci_dev *pci_dev = container_of(d, struct pci_dev, dev);
char *out = buf;
}
static DEVICE_ATTR(pci, S_IRUGO, show_pci, NULL);
-static ssize_t show_cfg(struct device *d, char *buf)
+static ssize_t show_cfg(struct device *d, struct device_attribute *attr,
+ char *buf)
{
- struct ipw2100_priv *p = (struct ipw2100_priv *)d->driver_data;
+ struct ipw2100_priv *p = d->driver_data;
return sprintf(buf, "0x%08x\n", (int)p->config);
}
static DEVICE_ATTR(cfg, S_IRUGO, show_cfg, NULL);
-static ssize_t show_status(struct device *d, char *buf)
+static ssize_t show_status(struct device *d, struct device_attribute *attr,
+ char *buf)
{
- struct ipw2100_priv *p = (struct ipw2100_priv *)d->driver_data;
+ struct ipw2100_priv *p = d->driver_data;
return sprintf(buf, "0x%08x\n", (int)p->status);
}
static DEVICE_ATTR(status, S_IRUGO, show_status, NULL);
-static ssize_t show_capability(struct device *d, char *buf)
+static ssize_t show_capability(struct device *d, struct device_attribute *attr,
+ char *buf)
{
- struct ipw2100_priv *p = (struct ipw2100_priv *)d->driver_data;
+ struct ipw2100_priv *p = d->driver_data;
return sprintf(buf, "0x%08x\n", (int)p->capability);
}
static DEVICE_ATTR(capability, S_IRUGO, show_capability, NULL);
};
-static ssize_t show_registers(struct device *d, char *buf)
+static ssize_t show_registers(struct device *d, struct device_attribute *attr,
+ char *buf)
{
int i;
struct ipw2100_priv *priv = dev_get_drvdata(d);
static DEVICE_ATTR(registers, S_IRUGO, show_registers, NULL);
-static ssize_t show_hardware(struct device *d, char *buf)
+static ssize_t show_hardware(struct device *d, struct device_attribute *attr,
+ char *buf)
{
struct ipw2100_priv *priv = dev_get_drvdata(d);
struct net_device *dev = priv->net_dev;
static DEVICE_ATTR(hardware, S_IRUGO, show_hardware, NULL);
-static ssize_t show_memory(struct device *d, char *buf)
+static ssize_t show_memory(struct device *d, struct device_attribute *attr,
+ char *buf)
{
struct ipw2100_priv *priv = dev_get_drvdata(d);
struct net_device *dev = priv->net_dev;
return len;
}
-static ssize_t store_memory(struct device *d, const char *buf, size_t count)
+static ssize_t store_memory(struct device *d, struct device_attribute *attr,
+ const char *buf, size_t count)
{
struct ipw2100_priv *priv = dev_get_drvdata(d);
struct net_device *dev = priv->net_dev;
static DEVICE_ATTR(memory, S_IWUSR|S_IRUGO, show_memory, store_memory);
-static ssize_t show_ordinals(struct device *d, char *buf)
+static ssize_t show_ordinals(struct device *d, struct device_attribute *attr,
+ char *buf)
{
struct ipw2100_priv *priv = dev_get_drvdata(d);
u32 val = 0;
static DEVICE_ATTR(ordinals, S_IRUGO, show_ordinals, NULL);
-static ssize_t show_stats(struct device *d, char *buf)
+static ssize_t show_stats(struct device *d, struct device_attribute *attr,
+ char *buf)
{
struct ipw2100_priv *priv = dev_get_drvdata(d);
char * out = buf;
return 0;
}
-static ssize_t show_internals(struct device *d, char *buf)
+static ssize_t show_internals(struct device *d, struct device_attribute *attr,
+ char *buf)
{
struct ipw2100_priv *priv = dev_get_drvdata(d);
int len = 0;
static DEVICE_ATTR(internals, S_IRUGO, show_internals, NULL);
-static ssize_t show_bssinfo(struct device *d, char *buf)
+static ssize_t show_bssinfo(struct device *d, struct device_attribute *attr,
+ char *buf)
{
struct ipw2100_priv *priv = dev_get_drvdata(d);
char essid[IW_ESSID_MAX_SIZE + 1];
static DEVICE_ATTR(bssinfo, S_IRUGO, show_bssinfo, NULL);
-
-
#ifdef CONFIG_IPW_DEBUG
static ssize_t show_debug_level(struct device_driver *d, char *buf)
{
#endif /* CONFIG_IPW_DEBUG */
-static ssize_t show_fatal_error(struct device *d, char *buf)
+static ssize_t show_fatal_error(struct device *d,
+ struct device_attribute *attr, char *buf)
{
struct ipw2100_priv *priv = dev_get_drvdata(d);
char *out = buf;
return out - buf;
}
-static ssize_t store_fatal_error(struct device *d, const char *buf,
- size_t count)
+static ssize_t store_fatal_error(struct device *d,
+ struct device_attribute *attr, const char *buf, size_t count)
{
struct ipw2100_priv *priv = dev_get_drvdata(d);
schedule_reset(priv);
static DEVICE_ATTR(fatal_error, S_IWUSR|S_IRUGO, show_fatal_error, store_fatal_error);
-static ssize_t show_scan_age(struct device *d, char *buf)
+static ssize_t show_scan_age(struct device *d, struct device_attribute *attr,
+ char *buf)
{
struct ipw2100_priv *priv = dev_get_drvdata(d);
return sprintf(buf, "%d\n", priv->ieee->scan_age);
}
-static ssize_t store_scan_age(struct device *d, const char *buf, size_t count)
+static ssize_t store_scan_age(struct device *d, struct device_attribute *attr,
+ const char *buf, size_t count)
{
struct ipw2100_priv *priv = dev_get_drvdata(d);
struct net_device *dev = priv->net_dev;
static DEVICE_ATTR(scan_age, S_IWUSR | S_IRUGO, show_scan_age, store_scan_age);
-static ssize_t show_rf_kill(struct device *d, char *buf)
+static ssize_t show_rf_kill(struct device *d, struct device_attribute *attr,
+ char *buf)
{
/* 0 - RF kill not enabled
1 - SW based RF kill active (sysfs)
return 1;
}
-static ssize_t store_rf_kill(struct device *d, const char *buf, size_t count)
+static ssize_t store_rf_kill(struct device *d, struct device_attribute *attr,
+ const char *buf, size_t count)
{
struct ipw2100_priv *priv = dev_get_drvdata(d);
ipw_radio_kill_sw(priv, buf[0] == '1');