From be1ee586cb1813d99c8aea449d1330c69f70df1f Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sun, 13 Nov 2011 18:37:59 +0000 Subject: [PATCH] revert accidentally committed modeswitch changes from r29036 SVN-Revision: 29038 --- utils/usb-modeswitch-data/Makefile | 6 +++--- utils/usb-modeswitch/Makefile | 8 ++++---- utils/usb-modeswitch/files/modeswitch.hotplug | 15 +-------------- 3 files changed, 8 insertions(+), 21 deletions(-) diff --git a/utils/usb-modeswitch-data/Makefile b/utils/usb-modeswitch-data/Makefile index d21a2ca9c..ed579c06c 100644 --- a/utils/usb-modeswitch-data/Makefile +++ b/utils/usb-modeswitch-data/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2010-2011 OpenWrt.org +# Copyright (C) 2010 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=usb-modeswitch-data -PKG_VERSION:=20111023 +PKG_VERSION:=20110705 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://www.draisberghof.de/usb_modeswitch/ -PKG_MD5SUM:=6e7cb67d0428bda241600b038ba11aeb +PKG_MD5SUM:=5046e7be8d10d2fe699f9af21a0c3769 include $(INCLUDE_DIR)/package.mk diff --git a/utils/usb-modeswitch/Makefile b/utils/usb-modeswitch/Makefile index c033c7291..411f0a5ea 100644 --- a/utils/usb-modeswitch/Makefile +++ b/utils/usb-modeswitch/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2008-2011 OpenWrt.org +# Copyright (C) 2008-2010 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=usb-modeswitch -PKG_VERSION:=1.2.0 -PKG_RELEASE:=2 +PKG_VERSION:=1.1.8 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://www.draisberghof.de/usb_modeswitch -PKG_MD5SUM:=1932ab96d6e3c5e0a6bdfac863338627 +PKG_MD5SUM:=1aaaa45e0465843e4973d7778bfbafbb include $(INCLUDE_DIR)/package.mk diff --git a/utils/usb-modeswitch/files/modeswitch.hotplug b/utils/usb-modeswitch/files/modeswitch.hotplug index 804245137..1aecb1fb3 100644 --- a/utils/usb-modeswitch/files/modeswitch.hotplug +++ b/utils/usb-modeswitch/files/modeswitch.hotplug @@ -120,20 +120,7 @@ if [ "$ACTION" = add ]; then # If a candidate is remaining, start usb-modeswitch [ -n "$configs" ] && { log "$DEVICENAME: Selecting ${configs%% *} for mode switching" - # ugly workaround, but working for all hw we got for testing - switching_done=0 - switching_tries=0 - local usb_dir="/sys/$DEVPATH" - [ -f "$usb_dir/idVendor" ] || usb_dir="${usb_dir%/*}" - while [ $switching_done -lt 1 -a $switching_tries -le 6 ]; do - $modeswitch -I -D -n -s 30 -c "${configs%% *}" - if [ $(sanitize "$usb_dir/idProduct") = $uPid ]; then - log "switching seemingly failed" - else - switching_done=1 - fi - switching_tries=$(( $switching_tries + 1 )) - done + $modeswitch -c "${configs%% *}" } } fi -- 2.30.2