21 Sep
2011
21 Sep
'11
2:41 p.m.
On Wed, Sep 21, 2011 at 01:09:30PM +0800, Scott Jiang wrote:
2011/9/20 Mark Brown broonie@opensource.wolfsonmicro.com:
- for (i = 0; i < ARRAY_SIZE(card->snd_card->driver); i++) {
- switch (card->snd_card->driver[i]) {
- case '_':
- case '-':
- case '\0':
- break;
- default:
- if (!isalnum(card->snd_card->driver[i]))
- card->snd_card->driver[i] = '_';
- break;
- }
- }
If '\0', we should break out of loop?
It's really not worth the code complexity, we only run this once during probe and the array is fixed size and small.