Convert some serial drivers to use use irq_attach.

This commit is contained in:
Gregory Nutt
2017-02-27 08:55:21 -06:00
parent b651e73057
commit 4cd31be19d
10 changed files with 50 additions and 211 deletions
+4 -14
View File
@@ -748,19 +748,9 @@ static void * cc3000_worker(FAR void *arg)
static int cc3000_interrupt(int irq, FAR void *context, FAR void *arg)
{
FAR struct cc3000_dev_s *priv;
FAR struct cc3000_dev_s *priv = (FAR struct cc3000_dev_s *)arg;
/* Which CC3000 device caused the interrupt? */
#ifndef CONFIG_CC3000_MULTIPLE
priv = &g_cc3000;
#else
for (priv = g_cc3000list;
priv && priv->configs->irq != irq;
priv = priv->flink);
ASSERT(priv != NULL);
#endif
DEBUGASSERT(priv != NULL);
/* Run the worker thread */
@@ -1522,7 +1512,7 @@ errout:
****************************************************************************/
int cc3000_register(FAR struct spi_dev_s *spi,
FAR struct cc3000_config_s *config, int minor)
FAR struct cc3000_config_s *config, int minor)
{
FAR struct cc3000_dev_s *priv;
char drvname[DEV_NAMELEN];
@@ -1577,7 +1567,7 @@ int cc3000_register(FAR struct spi_dev_s *spi,
/* Attach the interrupt handler */
ret = config->irq_attach(config, cc3000_interrupt, NULL);
ret = config->irq_attach(config, cc3000_interrupt, priv);
if (ret < 0)
{
nerr("ERROR: Failed to attach interrupt\n");