don't needlessly duplicate code
This commit is contained in:
@@ -524,12 +524,11 @@ CFontz_set_brightness(Driver *drvthis, int state, int promille)
|
||||
/* store the software value since there is not get */
|
||||
if (state == BACKLIGHT_ON) {
|
||||
p->brightness = promille;
|
||||
//CFontz_backlight(drvthis, BACKLIGHT_ON);
|
||||
}
|
||||
else {
|
||||
p->offbrightness = promille;
|
||||
//CFontz_backlight(drvthis, BACKLIGHT_OFF);
|
||||
}
|
||||
//CFontz_backlight(drvthis, state);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -579,12 +579,11 @@ CFontz633_set_brightness(Driver *drvthis, int state, int promille)
|
||||
/* store the software value since there is not get */
|
||||
if (state == BACKLIGHT_ON) {
|
||||
p->brightness = promille;
|
||||
//CFontz633_backlight(drvthis, BACKLIGHT_ON);
|
||||
}
|
||||
else {
|
||||
p->offbrightness = promille;
|
||||
//CFontz633_backlight(drvthis, BACKLIGHT_OFF);
|
||||
}
|
||||
//CFontz633_backlight(drvthis, state);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -742,12 +742,11 @@ CFontzPacket_set_brightness(Driver *drvthis, int state, int promille)
|
||||
/* store the software value since there is not get */
|
||||
if (state == BACKLIGHT_ON) {
|
||||
p->brightness = promille;
|
||||
//CFontzPacket_backlight(drvthis, BACKLIGHT_ON);
|
||||
}
|
||||
else {
|
||||
p->offbrightness = promille;
|
||||
//CFontzPacket_backlight(drvthis, BACKLIGHT_OFF);
|
||||
}
|
||||
//CFontzPacket_backlight(drvthis, state);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -470,7 +470,7 @@ MD8800_set_brightness(Driver *drvthis, int state, int promille)
|
||||
else {
|
||||
p->off_brightness = promille;
|
||||
}
|
||||
// MD8800_backlight(drvthis,state); //
|
||||
//MD8800_backlight(drvthis,state);
|
||||
}
|
||||
|
||||
|
||||
@@ -493,7 +493,6 @@ MD8800_backlight (Driver *drvthis, int on)
|
||||
write(p->fd, "\x1B\x40", 2);
|
||||
write(p->fd, &p->hw_brightness, 1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
@@ -528,18 +527,14 @@ MODULE_EXPORT void
|
||||
MD8800_flush (Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
// char out[2];
|
||||
|
||||
|
||||
if (memcmp(p->backingstore, p->framebuf, p->width*p->height) == 0)
|
||||
return;
|
||||
|
||||
|
||||
/* Backing-store implementation. If it's already
|
||||
* on the screen, don't put it there again
|
||||
*/
|
||||
|
||||
|
||||
/* else, write out the entire row */
|
||||
memcpy(p->backingstore, p->framebuf, p->width*p->height);
|
||||
|
||||
|
||||
@@ -727,12 +727,11 @@ MtxOrb_set_brightness(Driver *drvthis, int state, int promille)
|
||||
/* store the software value since there is no get */
|
||||
if (state == BACKLIGHT_ON) {
|
||||
p->brightness = promille;
|
||||
MtxOrb_backlight(drvthis, BACKLIGHT_ON);
|
||||
}
|
||||
else {
|
||||
p->offbrightness = promille;
|
||||
MtxOrb_backlight(drvthis, BACKLIGHT_OFF);
|
||||
}
|
||||
MtxOrb_backlight(drvthis, state);
|
||||
}
|
||||
|
||||
|
||||
@@ -810,7 +809,7 @@ MtxOrb_output (Driver *drvthis, int state)
|
||||
|
||||
|
||||
/**
|
||||
* Clear the LCD using ints hardware command
|
||||
* Clear the LCD using its hardware command
|
||||
* \param drvthis Pointer to driver structure.
|
||||
*/
|
||||
static void
|
||||
|
||||
@@ -747,12 +747,11 @@ NoritakeVFD_set_brightness(Driver *drvthis, int state, int promille)
|
||||
/* store the software value since there is not get */
|
||||
if (state == BACKLIGHT_ON) {
|
||||
p->brightness = promille;
|
||||
//Noritake_backlight(drvthis, BACKLIGHT_ON);
|
||||
}
|
||||
else {
|
||||
p->offbrightness = promille;
|
||||
//Noritake_backlight(drvthis, BACKLIGHT_OFF);
|
||||
}
|
||||
//Noritake_backlight(drvthis, state);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user