Commit 18781064 authored by Dirk Behme's avatar Dirk Behme Committed by Kevin Hilman

ARM: DAVINCI: Fix warnings in davinci_emac.c

Fix warnings

drivers/net/davinci_emac.c: In function 'emac_p_write_stats':
drivers/net/davinci_emac.c:2732: warning: ignoring return value of
'copy_from_user', declared with attribute warn_unused_result
drivers/net/davinci_emac.c: In function 'emac_dev_open':
drivers/net/davinci_emac.c:3517: warning: 'deprecated_irq_flag' is
deprecated (declared at include/linux/interrupt.h:66)
drivers/net/davinci_emac.c: In function 'emac_dev_probe':
drivers/net/davinci_emac.c:6804: warning: ignoring return value of
'driver_create_file', declared with attribute warn_unused_result
Signed-off-by: default avatarDirk Behme <dirk.behme@gmail.com>
Signed-off-by: default avatarKevin Hilman <khilman@mvista.com>
parent 1dabc6ac
......@@ -2729,7 +2729,9 @@ static int emac_p_write_stats(struct file *fp, const char *buf,
return -EFAULT;
}
copy_from_user(local_buf, buf, count);
ret_val = copy_from_user(local_buf, buf, count);
if(ret_val)
return ret_val;
local_buf[count - 1] = '\0'; /* ignoring last \n char */
ret_val = count;
if (strcmp("0", local_buf) == 0) {
......@@ -3514,7 +3516,7 @@ static int emac_dev_open(struct net_device *netdev)
}
}
if (request_irq(dev->init_cfg.intr_line, emac_hal_isr, SA_INTERRUPT,
if (request_irq(dev->init_cfg.intr_line, emac_hal_isr, IRQF_DISABLED,
"EMAC", dev)) {
ERR("Failed to register the irq %d for TI DaVinci EMAC %s.\n",
dev->init_cfg.intr_line, netdev->name);
......@@ -6801,7 +6803,9 @@ static int __init emac_dev_probe(void)
return -1;
}
driver_create_file(&emac_driver, &driver_attr_version);
ret_val = driver_create_file(&emac_driver, &driver_attr_version);
if(ret_val)
return ret_val;
for (unit = 0; unit < instance_count; unit++) {
struct net_device *netdev;
emac_dev_t *dev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment