summaryrefslogtreecommitdiff
path: root/linux/drivers/media/radio/si470x/radio-si470x-usb.c
diff options
context:
space:
mode:
authorTobias Lorenz <tobias.lorenz@gmx.net>2009-08-09 19:23:02 +0200
committerTobias Lorenz <tobias.lorenz@gmx.net>2009-08-09 19:23:02 +0200
commitedce5773436aeaa6d195d1db0cc80f4c10a7acf1 (patch)
tree4a21b5933d1450f5eecfa17c2033ab61cbfbd2bd /linux/drivers/media/radio/si470x/radio-si470x-usb.c
parent951be4abc87f0caf46aba5d23981a83c323deda2 (diff)
downloadmediapointer-dvb-s2-edce5773436aeaa6d195d1db0cc80f4c10a7acf1.tar.gz
mediapointer-dvb-s2-edce5773436aeaa6d195d1db0cc80f4c10a7acf1.tar.bz2
radio-si470x: add disconnect check function
The si470x_disconnect_check is function to check disconnect state of radio in common file. The function is implemented in each interface file. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Acked-by: Tobias Lorenz <tobias.lorenz@gmx.net> --- .../media/radio/si470x/radio-si470x-common.c | 40 +++++++++---------- .../drivers/media/radio/si470x/radio-si470x-usb.c | 17 ++++++++ linux/drivers/media/radio/si470x/radio-si470x.h | 1 + 3 files changed, 37 insertions(+), 21 deletions(-)
Diffstat (limited to 'linux/drivers/media/radio/si470x/radio-si470x-usb.c')
-rw-r--r--linux/drivers/media/radio/si470x/radio-si470x-usb.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/linux/drivers/media/radio/si470x/radio-si470x-usb.c b/linux/drivers/media/radio/si470x/radio-si470x-usb.c
index 650816140..2f5cf6c72 100644
--- a/linux/drivers/media/radio/si470x/radio-si470x-usb.c
+++ b/linux/drivers/media/radio/si470x/radio-si470x-usb.c
@@ -371,6 +371,23 @@ static int si470x_get_scratch_page_versions(struct si470x_device *radio)
/**************************************************************************
+ * General Driver Functions - DISCONNECT_CHECK
+ **************************************************************************/
+
+/*
+ * si470x_disconnect_check - check whether radio disconnects
+ */
+int si470x_disconnect_check(struct si470x_device *radio)
+{
+ if (radio->disconnected)
+ return -EIO;
+ else
+ return 0;
+}
+
+
+
+/**************************************************************************
* RDS Driver Functions
**************************************************************************/