From 489136d3001a4bc8c145bbf2fcfa94b030d3ce05 Mon Sep 17 00:00:00 2001 From: Mike Isely Date: Sat, 11 Mar 2006 21:27:44 -0600 Subject: Fix compilation issue involving MODULE_DEVICE_TABLE in pvrusb2 From: Mike Isely Move MODULE_DEVICE_TABLE to pvrusb2-hdw.c, in order to solve compilation issue where that macro is pointing to an external symbol. I have not seen this problem, but others have and so I'm fixing the code. Different behavior is likely tied to gcc version in use. Signed-off-by: Mike Isely --- linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c | 2 ++ linux/drivers/media/video/pvrusb2/pvrusb2-main.c | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c index 91b3336de..b87651e5a 100644 --- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c @@ -41,6 +41,8 @@ struct usb_device_id pvr2_device_table[] = { { } }; +MODULE_DEVICE_TABLE(usb, pvr2_device_table); + static const char *pvr2_device_names[] = { [PVR2_HDW_TYPE_29XXX] = "WinTV PVR USB2 Model Category 29xxxx", [PVR2_HDW_TYPE_24XXX] = "WinTV PVR USB2 Model Category 24xxxx", diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-main.c b/linux/drivers/media/video/pvrusb2/pvrusb2-main.c index 8e22c93e0..c554671af 100644 --- a/linux/drivers/media/video/pvrusb2/pvrusb2-main.c +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-main.c @@ -161,7 +161,11 @@ static void __exit pvr_exit(void) module_init(pvr_init); module_exit(pvr_exit); -MODULE_DEVICE_TABLE (usb, pvr2_device_table); +/* Mike Isely 11-Mar-2006: See pvrusb2-hdw.c for + MODULE_DEVICE_TABLE(). We have to declare that attribute there + because that's where the device table actually is now and it seems + that certain gcc configurations get angry if MODULE_DEVICE_TABLE() + is used on what ends up being an external symbol. */ MODULE_AUTHOR(DRIVER_AUTHOR); MODULE_DESCRIPTION(DRIVER_DESC); MODULE_LICENSE("GPL"); -- cgit v1.2.3