From: Dave Airlie Date: Wed, 4 Aug 2004 10:53:21 +0000 (+0000) Subject: 2.4 hotplug compat X-Git-Tag: submit/1.0/20121108.012404~2045 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=be3e54bc15aadf26743a8d0150b8fa38952863b4;p=profile%2Fivi%2Flibdrm.git 2.4 hotplug compat --- diff --git a/linux-core/drmP.h b/linux-core/drmP.h index 7b136df..8ac39bb 100644 --- a/linux-core/drmP.h +++ b/linux-core/drmP.h @@ -569,6 +569,7 @@ typedef struct drm_vbl_sig { #endif + /** * DRM device structure. */ diff --git a/linux-core/drm_compat.h b/linux-core/drm_compat.h index 3bb0b70..5b1b231 100644 --- a/linux-core/drm_compat.h +++ b/linux-core/drm_compat.h @@ -120,12 +120,16 @@ struct device; #define class_simple_device_add(...) do {} while (0) -static inline void class_simple_device_remove(dev_t dev){}; +static inline void class_simple_device_remove(dev_t dev){} -static inline void class_simple_destroy(struct class_simple *cs){}; +static inline void class_simple_destroy(struct class_simple *cs){} static inline struct class_simple *class_simple_create(struct module *owner, char *name) { return (struct class_simple *)owner; } +static inline void drm_hotplug(void) {} + +static inline void class_simple_set_hotplug(struct class_simple *cs, void (*fn)(void)); + #ifndef pci_pretty_name #define pci_pretty_name(x) x->name #endif diff --git a/linux-core/drm_stub.c b/linux-core/drm_stub.c index d61f73e..9dbf561 100644 --- a/linux-core/drm_stub.c +++ b/linux-core/drm_stub.c @@ -76,6 +76,7 @@ static struct file_operations DRM(stub_fops) = { .open = DRM(stub_open) }; +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0) static int drm_hotplug (struct class_device *dev, char **envp, int num_envp, char *buffer, int buffer_size) { @@ -142,6 +143,7 @@ static int drm_hotplug (struct class_device *dev, char **envp, int num_envp, return 0; } +#endif /** * Get a device minor number. diff --git a/linux/drmP.h b/linux/drmP.h index 7b136df..8ac39bb 100644 --- a/linux/drmP.h +++ b/linux/drmP.h @@ -569,6 +569,7 @@ typedef struct drm_vbl_sig { #endif + /** * DRM device structure. */ diff --git a/linux/drm_compat.h b/linux/drm_compat.h index 3bb0b70..5b1b231 100644 --- a/linux/drm_compat.h +++ b/linux/drm_compat.h @@ -120,12 +120,16 @@ struct device; #define class_simple_device_add(...) do {} while (0) -static inline void class_simple_device_remove(dev_t dev){}; +static inline void class_simple_device_remove(dev_t dev){} -static inline void class_simple_destroy(struct class_simple *cs){}; +static inline void class_simple_destroy(struct class_simple *cs){} static inline struct class_simple *class_simple_create(struct module *owner, char *name) { return (struct class_simple *)owner; } +static inline void drm_hotplug(void) {} + +static inline void class_simple_set_hotplug(struct class_simple *cs, void (*fn)(void)); + #ifndef pci_pretty_name #define pci_pretty_name(x) x->name #endif diff --git a/linux/drm_stub.h b/linux/drm_stub.h index d61f73e..9dbf561 100644 --- a/linux/drm_stub.h +++ b/linux/drm_stub.h @@ -76,6 +76,7 @@ static struct file_operations DRM(stub_fops) = { .open = DRM(stub_open) }; +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0) static int drm_hotplug (struct class_device *dev, char **envp, int num_envp, char *buffer, int buffer_size) { @@ -142,6 +143,7 @@ static int drm_hotplug (struct class_device *dev, char **envp, int num_envp, return 0; } +#endif /** * Get a device minor number.