summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/device/odevice_zaurus.cpp
Unidiff
Diffstat (limited to 'libopie2/opiecore/device/odevice_zaurus.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_zaurus.cpp44
1 files changed, 2 insertions, 42 deletions
diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp
index b22ee70..cbc7a24 100644
--- a/libopie2/opiecore/device/odevice_zaurus.cpp
+++ b/libopie2/opiecore/device/odevice_zaurus.cpp
@@ -380,43 +380,6 @@ bool Zaurus::setLedState( OLed which, OLedState st )
380 return false; 380 return false;
381} 381}
382 382
383bool Zaurus::setSoftSuspend ( bool soft )
384{
385 if (!m_embedix) {
386 /* non-Embedix kernels dont have kernel autosuspend */
387 return ODevice::setSoftSuspend( soft );
388 }
389
390 bool res = false;
391 int fd;
392
393 if ((( fd = ::open ( "/dev/apm_bios", O_RDWR )) >= 0 ) ||
394 (( fd = ::open ( "/dev/misc/apm_bios",O_RDWR )) >= 0 )) {
395
396 int sources = ::ioctl( fd, APM_IOCGEVTSRC, 0 ); // get current event sources
397
398 if ( sources >= 0 ) {
399 if ( soft )
400 sources &= ~APM_EVT_POWER_BUTTON;
401 else
402 sources |= APM_EVT_POWER_BUTTON;
403
404 if ( ::ioctl( fd, APM_IOCSEVTSRC, sources ) >= 0 ) // set new event sources
405 res = true;
406 else
407 perror ( "APM_IOCGEVTSRC" );
408 }
409 else
410 perror ( "APM_IOCGEVTSRC" );
411
412 ::close( fd );
413 }
414 else
415 perror( "/dev/apm_bios or /dev/misc/apm_bios" );
416
417 return res;
418}
419
420int Zaurus::displayBrightnessResolution() const 383int Zaurus::displayBrightnessResolution() const
421{ 384{
422 int res = 1; 385 int res = 1;
@@ -540,9 +503,7 @@ bool Zaurus::suspend()
540Transformation Zaurus::rotation() const 503Transformation Zaurus::rotation() const
541{ 504{
542 Transformation rot; 505 Transformation rot;
543 int handle = 0; 506
544 int retval = 0;
545
546 switch ( d->m_model ) { 507 switch ( d->m_model ) {
547 case Model_Zaurus_SLC3000: // fallthrough 508 case Model_Zaurus_SLC3000: // fallthrough
548 case Model_Zaurus_SLC7x0: 509 case Model_Zaurus_SLC7x0:
@@ -566,8 +527,7 @@ Transformation Zaurus::rotation() const
566ODirection Zaurus::direction() const 527ODirection Zaurus::direction() const
567{ 528{
568 ODirection dir; 529 ODirection dir;
569 int handle = 0; 530
570 int retval = 0;
571 switch ( d->m_model ) { 531 switch ( d->m_model ) {
572 case Model_Zaurus_SLC3000: // fallthrough 532 case Model_Zaurus_SLC3000: // fallthrough
573 case Model_Zaurus_SLC7x0: 533 case Model_Zaurus_SLC7x0: