mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
Convert some serial drivers to use use irq_attach.
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user