fix avision device initialization (#706877)
This commit is contained in:
parent
ea4bcdd599
commit
55feaaff59
91
sane-backends-1.0.22-avision-init-devices.patch
Normal file
91
sane-backends-1.0.22-avision-init-devices.patch
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
From c688c041b21f955e420e0f1fb7807253d4f4035c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Nils Philippsen <nils@redhat.com>
|
||||||
|
Date: Tue, 17 Apr 2012 11:42:54 +0200
|
||||||
|
Subject: [PATCH] patch: avision-init-devices
|
||||||
|
|
||||||
|
Squashed commit of the following:
|
||||||
|
|
||||||
|
commit ff9cb7dad86822147bc51a5cef9688603cbbcfa4
|
||||||
|
Author: Mike Kelly <mike@piratehaven.org>
|
||||||
|
Date: Wed Mar 21 21:03:00 2012 -0700
|
||||||
|
|
||||||
|
Added sane_reload_devices() to sane_init().
|
||||||
|
|
||||||
|
Adding sane_reload_devices() to sane_init() required sane_init() to be moved
|
||||||
|
below the sane_reload_devices() declaration. This restores the original
|
||||||
|
functionality present before I split the sane_reload_devices() code out of
|
||||||
|
sane_init() so that it could be called from sane_get_devices().
|
||||||
|
(cherry picked from commit 33bb529c5f8ca013fb499addc14c7fb229203ea8)
|
||||||
|
---
|
||||||
|
backend/avision.c | 48 +++++++++++++++++++++++++-----------------------
|
||||||
|
1 file changed, 25 insertions(+), 23 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/backend/avision.c b/backend/avision.c
|
||||||
|
index 3398e08..8c066d7 100644
|
||||||
|
--- a/backend/avision.c
|
||||||
|
+++ b/backend/avision.c
|
||||||
|
@@ -7526,29 +7526,6 @@ attach_one_usb (const char* dev)
|
||||||
|
attach (dev, AV_USB, 0);
|
||||||
|
return SANE_STATUS_GOOD;
|
||||||
|
}
|
||||||
|
-
|
||||||
|
-SANE_Status
|
||||||
|
-sane_init (SANE_Int* version_code, SANE_Auth_Callback authorize)
|
||||||
|
-{
|
||||||
|
- authorize = authorize; /* silence gcc */
|
||||||
|
-
|
||||||
|
- DBG_INIT();
|
||||||
|
-
|
||||||
|
-#ifdef AVISION_STATIC_DEBUG_LEVEL
|
||||||
|
- DBG_LEVEL = AVISION_STATIC_DEBUG_LEVEL;
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
- DBG (3, "sane_init:(Version: %i.%i Build: %i)\n",
|
||||||
|
- SANE_CURRENT_MAJOR, V_MINOR, BACKEND_BUILD);
|
||||||
|
-
|
||||||
|
- /* must come first */
|
||||||
|
- sanei_thread_init ();
|
||||||
|
-
|
||||||
|
- if (version_code)
|
||||||
|
- *version_code = SANE_VERSION_CODE (SANE_CURRENT_MAJOR, V_MINOR, BACKEND_BUILD);
|
||||||
|
-
|
||||||
|
- return SANE_STATUS_GOOD;
|
||||||
|
-}
|
||||||
|
|
||||||
|
static SANE_Status
|
||||||
|
sane_reload_devices (void)
|
||||||
|
@@ -7722,6 +7699,31 @@ sane_reload_devices (void)
|
||||||
|
return SANE_STATUS_GOOD;
|
||||||
|
}
|
||||||
|
|
||||||
|
+SANE_Status
|
||||||
|
+sane_init (SANE_Int* version_code, SANE_Auth_Callback authorize)
|
||||||
|
+{
|
||||||
|
+ authorize = authorize; /* silence gcc */
|
||||||
|
+
|
||||||
|
+ DBG_INIT();
|
||||||
|
+
|
||||||
|
+#ifdef AVISION_STATIC_DEBUG_LEVEL
|
||||||
|
+ DBG_LEVEL = AVISION_STATIC_DEBUG_LEVEL;
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+ DBG (3, "sane_init:(Version: %i.%i Build: %i)\n",
|
||||||
|
+ SANE_CURRENT_MAJOR, V_MINOR, BACKEND_BUILD);
|
||||||
|
+
|
||||||
|
+ /* must come first */
|
||||||
|
+ sanei_thread_init ();
|
||||||
|
+
|
||||||
|
+ if (version_code)
|
||||||
|
+ *version_code = SANE_VERSION_CODE (SANE_CURRENT_MAJOR, V_MINOR, BACKEND_BUILD);
|
||||||
|
+
|
||||||
|
+ sane_reload_devices ();
|
||||||
|
+
|
||||||
|
+ return SANE_STATUS_GOOD;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
void
|
||||||
|
sane_exit (void)
|
||||||
|
{
|
||||||
|
--
|
||||||
|
1.7.10
|
||||||
|
|
@ -38,6 +38,8 @@ Patch8: sane-backends-1.0.22-epson-stylus-sx125.patch
|
|||||||
Patch9: sane-backends-1.0.22-av220-gray-modes.patch
|
Patch9: sane-backends-1.0.22-av220-gray-modes.patch
|
||||||
# backported from upstream: cef28b4d46a0faa4d4acb60d815ac9a49036ba85
|
# backported from upstream: cef28b4d46a0faa4d4acb60d815ac9a49036ba85
|
||||||
Patch10: sane-backends-1.0.22-Lexmark-X1100.patch
|
Patch10: sane-backends-1.0.22-Lexmark-X1100.patch
|
||||||
|
# backported from upstream: 33bb529c5f8ca013fb499addc14c7fb229203ea8
|
||||||
|
Patch11: sane-backends-1.0.22-avision-init-devices.patch
|
||||||
URL: http://www.sane-project.org
|
URL: http://www.sane-project.org
|
||||||
|
|
||||||
BuildRequires: tetex-latex
|
BuildRequires: tetex-latex
|
||||||
@ -128,6 +130,7 @@ This package contains backend drivers to access digital cameras through SANE.
|
|||||||
%patch8 -p1 -b .epson-stylus-sx125
|
%patch8 -p1 -b .epson-stylus-sx125
|
||||||
%patch9 -p1 -b .av220-gray-modes
|
%patch9 -p1 -b .av220-gray-modes
|
||||||
%patch10 -p1 -b .Lexmark-X1100
|
%patch10 -p1 -b .Lexmark-X1100
|
||||||
|
%patch11 -p1 -b .avision-init-devices
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# use PIC/PIE because SANE-enabled software is likely to deal with data coming
|
# use PIC/PIE because SANE-enabled software is likely to deal with data coming
|
||||||
@ -203,6 +206,9 @@ install -m 0644 tools/sane-backends.pc %{buildroot}%{_libdir}/pkgconfig/
|
|||||||
%{_libdir}/sane/*gphoto2.so.*
|
%{_libdir}/sane/*gphoto2.so.*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Apr 17 2012 Nils Philippsen <nils@redhat.com> - 1.0.22-10
|
||||||
|
- fix avision device initialization (#706877)
|
||||||
|
|
||||||
* Tue Jan 10 2012 Nils Philippsen <nils@redhat.com> - 1.0.22-9
|
* Tue Jan 10 2012 Nils Philippsen <nils@redhat.com> - 1.0.22-9
|
||||||
- rebuild for gcc 4.7
|
- rebuild for gcc 4.7
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user