Skip to content

Commit 94380d6

Browse files
committed
Add function_stop
1 parent 91e9f5c commit 94380d6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/radxa-otgutils

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ configfs_init()
3737
esac
3838
}
3939

40-
function_init()
40+
function_stop()
4141
{
4242
case "$MODE" in
4343
adbd)
@@ -48,10 +48,9 @@ function_init()
4848
;;
4949
esac
5050

51-
if [ ! -e "/sys/kernel/config/usb_gadget/radxa-$MODE/configs/r.1/$GADGET" ];
51+
if [ -e "/sys/kernel/config/usb_gadget/radxa-otgutils/configs/r.1/$GADGET" ];
5252
then
53-
mkdir -p "/sys/kernel/config/usb_gadget/radxa-$MODE/functions/$GADGET"
54-
ln -s "/sys/kernel/config/usb_gadget/radxa-$MODE/functions/$GADGET" "/sys/kernel/config/usb_gadget/radxa-$MODE/configs/r.1"
53+
rm "/sys/kernel/config/usb_gadget/radxa-otgutils/configs/r.1/$GADGET"
5554
fi
5655
}
5756

0 commit comments

Comments
 (0)