Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] em28xx-video: implement em28xx_ops: suspend/resume hooks

Implement em28xx_ops: suspend/resume hooks. em28xx usb driver will
invoke em28xx_ops: suspend and resume hooks for all its extensions
from its suspend() and resume() interfaces.

Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>

authored by

Shuah Khan and committed by
Mauro Carvalho Chehab
a61f6811 5025076a

+28
+28
drivers/media/usb/em28xx/em28xx-video.c
··· 1933 1933 return 0; 1934 1934 } 1935 1935 1936 + static int em28xx_v4l2_suspend(struct em28xx *dev) 1937 + { 1938 + if (dev->is_audio_only) 1939 + return 0; 1940 + 1941 + if (!dev->has_video) 1942 + return 0; 1943 + 1944 + em28xx_info("Suspending video extension"); 1945 + em28xx_stop_urbs(dev); 1946 + return 0; 1947 + } 1948 + 1949 + static int em28xx_v4l2_resume(struct em28xx *dev) 1950 + { 1951 + if (dev->is_audio_only) 1952 + return 0; 1953 + 1954 + if (!dev->has_video) 1955 + return 0; 1956 + 1957 + em28xx_info("Resuming video extension"); 1958 + /* what do we do here */ 1959 + return 0; 1960 + } 1961 + 1936 1962 /* 1937 1963 * em28xx_v4l2_close() 1938 1964 * stops streaming and deallocates all resources allocated by the v4l2 ··· 2531 2505 .name = "Em28xx v4l2 Extension", 2532 2506 .init = em28xx_v4l2_init, 2533 2507 .fini = em28xx_v4l2_fini, 2508 + .suspend = em28xx_v4l2_suspend, 2509 + .resume = em28xx_v4l2_resume, 2534 2510 }; 2535 2511 2536 2512 static int __init em28xx_video_register(void)