Skip to content

Commit

Permalink
Staging: comedi: serial2002: decrease stack usage
Browse files Browse the repository at this point in the history
512 bytes of stack can be saved in serial_2002_open() by modifying
'struct config_t'.  A short int suffices for the 'kind' and 'bits'
members.  (Actually, a char would suffice, but wouldn't save any more
stack than a short int.)

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Ian Abbott authored and Greg Kroah-Hartman committed Dec 11, 2009
1 parent ea25371 commit 67a6efb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/comedi/drivers/serial2002.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,8 @@ static void serial_2002_open(struct comedi_device *dev)
} else {
struct config_t {

int kind;
int bits;
short int kind;
short int bits;
int min;
int max;
};
Expand Down

0 comments on commit 67a6efb

Please sign in to comment.