Change-Id: I5d463473d2a95d477fb54c6e40340f7641c8b52e
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
prefix=@PREFIX@
exec_prefix=/usr
-libdir=@LIB_INSTALL_DIR@
+libdir=@LIB_INSTALL_DIR@/hal
includedir=/usr/include
Name: @PC_NAME@
int hal_device_haptic_get_backend(void);
int hal_device_haptic_put_backend(void);
+int hal_device_haptic_check_backend(void);
int hal_device_haptic_get_device_count(int *count);
int hal_device_haptic_open_device(int *handle);
%files
%manifest %{name}.manifest
%license LICENSE.Apache-2.0
-%{_libdir}/hal/libhal-api-device.so.*
+%{_libdir}/hal/libhal-api-device.so*
%files devel
%manifest %{name}.manifest
return -ENODEV;
}
+ if (!g_haptic_funcs)
+ return -ENODEV;
+
+ if (!g_haptic_funcs->is_valid || !(g_haptic_funcs->is_valid())) {
+ hal_device_haptic_put_backend();
+ return -ENODEV;
+ }
+
return 0;
}
int hal_device_haptic_put_backend(void)
{
if (!g_haptic_funcs)
- return 0;
+ return -ENODEV;
hal_common_put_backend(HAL_MODULE_DEVICE_HAPTIC, (void *)g_haptic_funcs);
g_haptic_funcs = NULL;
return 0;
}
+int hal_device_haptic_check_backend(void)
+{
+ if (!g_haptic_funcs)
+ return -ENODEV;
+
+ return 0;
+}
+
int hal_device_haptic_get_device_count(int *count)
{
if (!g_haptic_funcs || !g_haptic_funcs->get_device_count)