Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 181701
b: refs/heads/master
c: 08cf8a5
h: refs/heads/master
i:
  181699: 8e8dfcb
v: v3
  • Loading branch information
Randy Dunlap authored and Mauro Carvalho Chehab committed Feb 26, 2010
1 parent e060202 commit c4ffacf
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 546e29b66a1aeec3b6a710aceeb2149871570416
refs/heads/master: 08cf8a57c51da7db9633c2827b3dbabfb7df51fd
4 changes: 4 additions & 0 deletions trunk/drivers/media/video/tlg2300/pd-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,11 @@ void destroy_video_device(struct video_device **v_dev);
extern int debug_mode;
void set_debug_mode(struct video_device *vfd, int debug_mode);

#ifdef CONFIG_PM
#define in_hibernation(pd) (pd->msg.event == PM_EVENT_FREEZE)
#else
#define in_hibernation(pd) (0)
#endif
#define get_pm_count(p) (atomic_read(&(p)->interface->pm_usage_cnt))

#define log(a, ...) printk(KERN_DEBUG "\t[ %s : %.3d ] "a"\n", \
Expand Down
19 changes: 14 additions & 5 deletions trunk/drivers/media/video/tlg2300/pd-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,11 @@ static int firmware_download(struct usb_device *udev)
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)
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit c4ffacf

Please sign in to comment.