refactoring macro AX89063_DEFAULT_SPEED --> AX89063_SPEED
authorAlexander Bluem <bluem@gmit-gmbh.de>
Mon, 10 Jan 2011 12:16:51 +0000 (13:16 +0100)
committerAlexander Bluem <bluem@gmit-gmbh.de>
Mon, 10 Jan 2011 12:16:51 +0000 (13:16 +0100)
ax89063.c
ax89063.h

index 9c02c35..128eabc 100644 (file)
--- a/ax89063.c
+++ b/ax89063.c
@@ -42,7 +42,7 @@ MODULE_EXPORT int ax89063_init(Driver *drvthis) {
        p->fd = -1;
        p->framebuf = NULL;
        p->framebuf_hw = NULL;
-       p->speed = AX89063_DEFAULT_SPEED;
+       p->speed = AX89063_SPEED;
        p->width = AX89063_WIDTH;
        p->height = AX89063_HEIGHT;
        p->cellwidth = AX89063_CELLWIDTH;
@@ -55,13 +55,13 @@ MODULE_EXPORT int ax89063_init(Driver *drvthis) {
        report(RPT_INFO, "%s: using Device %s", drvthis->name, p->device);
 
        /* Get device speed. */
-       if (p->speed != AX89063_DEFAULT_SPEED) {
+       if (p->speed != AX89063_SPEED) {
                report(
                                RPT_WARNING,
                                "%s: Illegal speed (%d) detected in config file. Using default (%d).",
-                               drvthis->name, p->speed, AX89063_DEFAULT_SPEED);
+                               drvthis->name, p->speed, AX89063_SPEED);
        } else {
-               p->speed = AX89063_DEFAULT_SPEED;
+               p->speed = AX89063_SPEED;
        }
 
        /* Set up serial port and open it. */
index d511146..49c5abd 100644 (file)
--- a/ax89063.h
+++ b/ax89063.h
@@ -7,7 +7,7 @@
 
 // Use hardcoded interface for now
 #define AX89063_DEFAULT_DEVICE "/dev/ttyS1"
-#define AX89063_DEFAULT_SPEED B9600
+#define AX89063_SPEED B9600
 #define AX89063_WIDTH 16
 #define AX89063_HEIGHT 2
 #define AX89063_CELLWIDTH 5