Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 7496
b: refs/heads/master
c: a956f4c
h: refs/heads/master
v: v3
  • Loading branch information
Dmitry Torokhov authored and Linus Torvalds committed Sep 7, 2005
1 parent 313317d commit 88aacfb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 98b7777331d4344821e900040da5d1d3016d9e67
refs/heads/master: a956f4ca3ede0a77e307f504e4a98554047b44ff
5 changes: 2 additions & 3 deletions trunk/drivers/net/irda/smsc-ircc2.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ struct smsc_ircc_cb {
/* Constants */

static const char *driver_name = "smsc-ircc2";
#define DIM(x) (sizeof(x)/(sizeof(*(x))))
#define SMSC_IRCC2_C_IRDA_FALLBACK_SPEED 9600
#define SMSC_IRCC2_C_DEFAULT_TRANSCEIVER 1
#define SMSC_IRCC2_C_NET_TIMEOUT 0
Expand Down Expand Up @@ -240,7 +239,7 @@ static smsc_transceiver_t smsc_transceivers[] =
{ "ATC IRMode", smsc_ircc_set_transceiver_smsc_ircc_atc, smsc_ircc_probe_transceiver_smsc_ircc_atc },
{ NULL, NULL }
};
#define SMSC_IRCC2_C_NUMBER_OF_TRANSCEIVERS (DIM(smsc_transceivers)-1)
#define SMSC_IRCC2_C_NUMBER_OF_TRANSCEIVERS (ARRAY_SIZE(smsc_transceivers) - 1)

/* SMC SuperIO chipsets definitions */

Expand Down Expand Up @@ -400,7 +399,7 @@ static int __init smsc_ircc_open(unsigned int fir_base, unsigned int sir_base, u
goto err_out;

err = -ENOMEM;
if (dev_count > DIM(dev_self)) {
if (dev_count >= ARRAY_SIZE(dev_self)) {
IRDA_WARNING("%s(), too many devices!\n", __FUNCTION__);
goto err_out1;
}
Expand Down

0 comments on commit 88aacfb

Please sign in to comment.