summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYacine Belkadi2012-04-12 11:17:08 +0200
committerYacine Belkadi2012-06-13 16:28:52 +0200
commit205dbe772472e30c8960a503c2b967be69a7df3d (patch)
tree11fbc6a0acf8d72f538ed15bd0133efc68cccc95
parentb4c5038375914d5546bed0a1cdf1afdbe93f0c53 (diff)
cleo/devkit/plcdrv: add error message if config_afe() fails, refs #3082
Add an error message when the configuration of the AFE fails.
-rw-r--r--cleopatre/devkit/plcdrv/src/plcdrv.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/cleopatre/devkit/plcdrv/src/plcdrv.c b/cleopatre/devkit/plcdrv/src/plcdrv.c
index 4395885d2d..92de9f475b 100644
--- a/cleopatre/devkit/plcdrv/src/plcdrv.c
+++ b/cleopatre/devkit/plcdrv/src/plcdrv.c
@@ -95,10 +95,11 @@ static struct net_device *plcdrv_device;
/**
* Configure AFE with the default configuration.
+ * \param dev net_device
* \return negative value if error, 0 if no error
*/
static int
-plcdrv_config_afe (void)
+plcdrv_config_afe (const struct net_device *dev)
{
int ret;
@@ -121,6 +122,10 @@ plcdrv_config_afe (void)
|| afe_write_reg (0x0E, 0x08)
|| afe_write_reg (0x03, 0xF8);
#endif
+
+ if (ret)
+ printk (KERN_ERR "%s: error while configuring the AFE.\n", dev->name);
+
return ret;
}
@@ -674,7 +679,7 @@ plcdrv_open (struct net_device *dev)
}
/* Configure AFE with the default configuration. */
- if (plcdrv_config_afe ())
+ if (plcdrv_config_afe (dev))
return -EFAULT;
/* Unreset Leon Processor. */