summaryrefslogtreecommitdiff
path: root/drivers/media/video/tlg2300/pd-main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/tlg2300/pd-main.c')
-rw-r--r--drivers/media/video/tlg2300/pd-main.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/media/video/tlg2300/pd-main.c b/drivers/media/video/tlg2300/pd-main.c
index fdcc5007a701..2cf0ebf9f28b 100644
--- a/drivers/media/video/tlg2300/pd-main.c
+++ b/drivers/media/video/tlg2300/pd-main.c
@@ -255,6 +255,11 @@ out:
return ret;
}
+static inline struct poseidon *get_pd(struct usb_interface *intf)
+{
+ return usb_get_intfdata(intf);
+}
+
#ifdef CONFIG_PM
/* one-to-one map : poseidon{} <----> usb_device{}'s port */
static inline void set_map_flags(struct poseidon *pd, struct usb_device *udev)
@@ -303,11 +308,6 @@ static inline int is_working(struct poseidon *pd)
return get_pm_count(pd) > 0;
}
-static inline struct poseidon *get_pd(struct usb_interface *intf)
-{
- return usb_get_intfdata(intf);
-}
-
static int poseidon_suspend(struct usb_interface *intf, pm_message_t msg)
{
struct poseidon *pd = get_pd(intf);
@@ -366,6 +366,15 @@ static void hibernation_resume(struct work_struct *w)
if (pd->pm_resume)
pd->pm_resume(pd);
}
+#else /* CONFIG_PM is not enabled: */
+static inline struct poseidon *find_old_poseidon(struct usb_device *udev)
+{
+ return NULL;
+}
+
+static inline void set_map_flags(struct poseidon *pd, struct usb_device *udev)
+{
+}
#endif
static bool check_firmware(struct usb_device *udev, int *down_firmware)