[vlc-devel] [PATCH] motion control: fix for recent kernel
Rafaël Carré
funman at videolan.org
Thu Dec 29 05:57:57 CET 2011
---
What to do : support older kernels too?
Check other drivers if they moved to /platform too?
Btw the --motion-use-rotate doesn't work anymore.
These days it's forbidden to find another module by name (video filter "rotate")
modules/control/motion.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/control/motion.c b/modules/control/motion.c
index b234f5c..cee8c96 100644
--- a/modules/control/motion.c
+++ b/modules/control/motion.c
@@ -129,11 +129,11 @@ int Open ( vlc_object_t *p_this )
/* Apple Motion Sensor support */
p_intf->p_sys->sensor = AMS_SENSOR;
}
- else if( access( "/sys/devices/applesmc.768/position", R_OK ) == 0 )
+ else if( access( "/sys/devices/platform/applesmc.768/position", R_OK ) == 0 )
{
/* Apple SMC (newer macbooks) */
/* Should be factorised with HDAPS */
- f = fopen( "/sys/devices/applesmc.768/calibrate", "r" );
+ f = fopen( "/sys/devices/platform/applesmc.768/calibrate", "r" );
if( f )
{
p_intf->p_sys->i_calibrate = fscanf( f, "(%d,%d)", &i_x, &i_y ) == 2 ? i_x: 0;
@@ -312,7 +312,7 @@ static int GetOrientation( intf_thread_t *p_intf )
return - i_x * 30; /* FIXME: arbitrary */
case APPLESMC_SENSOR:
- f = fopen( "/sys/devices/applesmc.768/position", "r" );
+ f = fopen( "/sys/devices/platform/applesmc.768/position", "r" );
if( !f )
{
return 0;
--
1.7.7.3
More information about the vlc-devel
mailing list