Commit b5008ae2 authored by Priit Laes's avatar Priit Laes Committed by Greg Kroah-Hartman

staging: csr: drv.c: Remove KERNEL_VERSION checks and associated defines

Signed-off-by: default avatarPriit Laes <plaes@plaes.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6e9950a6
...@@ -123,11 +123,7 @@ static void udi_set_log_filter(ul_client_t *pcli, ...@@ -123,11 +123,7 @@ static void udi_set_log_filter(ul_client_t *pcli,
/* Mutex to protect access to priv->sme_cli */ /* Mutex to protect access to priv->sme_cli */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
DEFINE_SEMAPHORE(udi_mutex); DEFINE_SEMAPHORE(udi_mutex);
#else
DECLARE_MUTEX(udi_mutex);
#endif
s32 CsrHipResultToStatus(CsrResult csrResult) s32 CsrHipResultToStatus(CsrResult csrResult)
{ {
...@@ -1979,18 +1975,6 @@ uf_sme_queue_message(unifi_priv_t *priv, u8 *buffer, int length) ...@@ -1979,18 +1975,6 @@ uf_sme_queue_message(unifi_priv_t *priv, u8 *buffer, int length)
} /* uf_sme_queue_message() */ } /* uf_sme_queue_message() */
#endif #endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
#define UF_DEVICE_CREATE(_class, _parent, _devno, _priv, _fmt, _args) \
device_create(_class, _parent, _devno, _priv, _fmt, _args)
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
#define UF_DEVICE_CREATE(_class, _parent, _devno, _priv, _fmt, _args) \
device_create_drvdata(_class, _parent, _devno, _priv, _fmt, _args)
#else
#define UF_DEVICE_CREATE(_class, _parent, _devno, _priv, _fmt, _args) \
device_create(_class, _parent, _devno, _fmt, _args)
#endif
/* /*
**************************************************************************** ****************************************************************************
* *
...@@ -2008,17 +1992,6 @@ static struct file_operations unifi_fops = { ...@@ -2008,17 +1992,6 @@ static struct file_operations unifi_fops = {
.poll = unifi_poll, .poll = unifi_poll,
}; };
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
#define UF_DEVICE_CREATE(_class, _parent, _devno, _priv, _fmt, _args) \
device_create(_class, _parent, _devno, _priv, _fmt, _args)
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
#define UF_DEVICE_CREATE(_class, _parent, _devno, _priv, _fmt, _args) \
device_create_drvdata(_class, _parent, _devno, _priv, _fmt, _args)
#else
#define UF_DEVICE_CREATE(_class, _parent, _devno, _priv, _fmt, _args) \
device_create(_class, _parent, _devno, _fmt, _args)
#endif
static dev_t unifi_first_devno; static dev_t unifi_first_devno;
static struct class *unifi_class; static struct class *unifi_class;
...@@ -2041,11 +2014,11 @@ int uf_create_device_nodes(unifi_priv_t *priv, int bus_id) ...@@ -2041,11 +2014,11 @@ int uf_create_device_nodes(unifi_priv_t *priv, int bus_id)
} }
#ifdef SDIO_EXPORTS_STRUCT_DEVICE #ifdef SDIO_EXPORTS_STRUCT_DEVICE
if (!UF_DEVICE_CREATE(unifi_class, priv->unifi_device, if (!device_create(unifi_class, priv->unifi_device,
devno, priv, "unifi%d", bus_id)) { devno, priv, "unifi%d", bus_id)) {
#else #else
priv->unifi_device = UF_DEVICE_CREATE(unifi_class, NULL, priv->unifi_device = device_create(unifi_class, NULL,
devno, priv, "unifi%d", bus_id); devno, priv, "unifi%d", bus_id);
if (priv->unifi_device == NULL) { if (priv->unifi_device == NULL) {
#endif /* SDIO_EXPORTS_STRUCT_DEVICE */ #endif /* SDIO_EXPORTS_STRUCT_DEVICE */
...@@ -2067,13 +2040,13 @@ int uf_create_device_nodes(unifi_priv_t *priv, int bus_id) ...@@ -2067,13 +2040,13 @@ int uf_create_device_nodes(unifi_priv_t *priv, int bus_id)
return r; return r;
} }
if (!UF_DEVICE_CREATE(unifi_class, if (!device_create(unifi_class,
#ifdef SDIO_EXPORTS_STRUCT_DEVICE #ifdef SDIO_EXPORTS_STRUCT_DEVICE
priv->unifi_device, priv->unifi_device,
#else #else
NULL, NULL,
#endif /* SDIO_EXPORTS_STRUCT_DEVICE */ #endif /* SDIO_EXPORTS_STRUCT_DEVICE */
devno, priv, "unifiudi%d", bus_id)) { devno, priv, "unifiudi%d", bus_id)) {
device_destroy(unifi_class, priv->unifi_cdev.dev); device_destroy(unifi_class, priv->unifi_cdev.dev);
cdev_del(&priv->unifiudi_cdev); cdev_del(&priv->unifiudi_cdev);
cdev_del(&priv->unifi_cdev); cdev_del(&priv->unifi_cdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment