Turn 'n' into a local variable.  This is required for additional changes.

Submitted by:	Sebastian Huber <sebastian.huber@embedded-brains.de>
Add const qualifier where appropriate

Submitted by:	Sebastian Huber <sebastian.huber@embedded-brains.de>
Add const qualifier where appropriate

Submitted by:	Sebastian Huber <sebastian.huber@embedded-brains.de>