提交 a8438814 编写于 作者: S Siva Yerramreddy 提交者: Greg Kroah-Hartman

misc: mic: add support for loading/unloading dma driver

modprobe dma driver upon start and remove it upon unload.
Signed-off-by: NSiva Yerramreddy <yshivakrishna@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 a93a5244
...@@ -48,18 +48,18 @@ start() ...@@ -48,18 +48,18 @@ start()
fi fi
echo -e $"Starting MPSS Stack" echo -e $"Starting MPSS Stack"
echo -e $"Loading MIC_HOST Module" echo -e $"Loading MIC_X100_DMA & MIC_HOST Modules"
# Ensure the driver is loaded for f in "mic_host" "mic_x100_dma"
if [ ! -d "$sysfs" ]; then do
modprobe mic_host modprobe $f
RETVAL=$? RETVAL=$?
if [ $RETVAL -ne 0 ]; then if [ $RETVAL -ne 0 ]; then
failure failure
echo echo
return $RETVAL return $RETVAL
fi fi
fi done
# Start the daemon # Start the daemon
echo -n $"Starting MPSSD " echo -n $"Starting MPSSD "
...@@ -170,8 +170,8 @@ unload() ...@@ -170,8 +170,8 @@ unload()
stop stop
sleep 5 sleep 5
echo -n $"Removing MIC_HOST Module: " echo -n $"Removing MIC_HOST & MIC_X100_DMA Modules: "
modprobe -r mic_host modprobe -r mic_host mic_x100_dma
RETVAL=$? RETVAL=$?
[ $RETVAL -ne 0 ] && failure || success [ $RETVAL -ne 0 ] && failure || success
echo echo
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册