[PATCH 1/1] staging: ion: Remove left over comment

2014-07-16 Thread Sachin Kamat
Commit 2bb9f5034ec7 (gpu: ion: Remove heapmask from client)
removed the heap_type_mask parameter. Remove the associated
kernel-doc comment too.

Signed-off-by: Sachin Kamat sachin.ka...@samsung.com
Cc: Rebecca Schultz Zavin rebe...@android.com
Cc: John Stultz john.stu...@linaro.org
---
 drivers/staging/android/ion/ion.h |1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/android/ion/ion.h 
b/drivers/staging/android/ion/ion.h
index dcd2a0cdb192..d305bb7e9a74 100644
--- a/drivers/staging/android/ion/ion.h
+++ b/drivers/staging/android/ion/ion.h
@@ -84,7 +84,6 @@ void ion_reserve(struct ion_platform_data *data);
 /**
  * ion_client_create() -  allocate a client and returns it
  * @dev:   the global ion device
- * @heap_type_mask:mask of heaps this client can allocate from
  * @name:  used for debugging
  */
 struct ion_client *ion_client_create(struct ion_device *dev,
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3 3/8] component: add support for component match array

2014-07-04 Thread Sachin Kamat
Hi Russell

 Add support for generating a set of component matches at master probe
 time, and submitting them to the component layer.  This allows the
 component layer to perform the matches internally without needing to
 call into the master driver, and allows for further restructuring of
 the component helper.

 Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
 ---

[snip]

 +int component_master_add_with_match(struct device *dev,
 +   const struct component_master_ops *ops,
 +   struct component_match *match)
  {
 struct master *master;
 int ret;

 +   if (ops-add_components  match)
 +   return -EINVAL;
 +
 +   /* Reallocate the match array for its true size */
 +   match = component_match_realloc(dev, match, match-num);

   ^
This gives a NULL pointer dereference error when match is NULL (as passed
by component_master_add() below). Observed this while testing linux-next
kernel (next-20140704) on Exynos based board with DRM enabled.


 +   if (IS_ERR(match))
 +   return PTR_ERR(match);
 +
 master = kzalloc(sizeof(*master), GFP_KERNEL);
 if (!master)
 return -ENOMEM;

 master-dev = dev;
 master-ops = ops;
 +   master-match = match;
 INIT_LIST_HEAD(master-components);

 /* Add to the list of available masters. */
 @@ -215,6 +322,13 @@ int component_master_add(struct device *dev,

 return ret  0 ? ret : 0;
  }
 +EXPORT_SYMBOL_GPL(component_master_add_with_match);
 +
 +int component_master_add(struct device *dev,
 +   const struct component_master_ops *ops)
 +{
 +   return component_master_add_with_match(dev, ops, NULL);
 +}
  EXPORT_SYMBOL_GPL(component_master_add);


-- 
Regards,
Sachin.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3 3/8] component: add support for component match array

2014-07-04 Thread Sachin Kamat
On Fri, Jul 4, 2014 at 4:22 PM, Russell King - ARM Linux
li...@arm.linux.org.uk wrote:
 On Fri, Jul 04, 2014 at 04:17:35PM +0530, Sachin Kamat wrote:
 Hi Russell

  +int component_master_add_with_match(struct device *dev,
  +   const struct component_master_ops *ops,
  +   struct component_match *match)
   {
  struct master *master;
  int ret;
 
  +   if (ops-add_components  match)
  +   return -EINVAL;
  +
  +   /* Reallocate the match array for its true size */
  +   match = component_match_realloc(dev, match, match-num);

^
 This gives a NULL pointer dereference error when match is NULL (as passed
 by component_master_add() below). Observed this while testing linux-next
 kernel (next-20140704) on Exynos based board with DRM enabled.

 Thanks for your report.  Please verify that the patch below resolves it
 for you.  Thanks.

Yes, the below patch fixes the crash. Thanks for the fix.



  drivers/base/component.c | 10 ++
  1 file changed, 6 insertions(+), 4 deletions(-)

 diff --git a/drivers/base/component.c b/drivers/base/component.c
 index b4236daed4fa..f748430bb654 100644
 --- a/drivers/base/component.c
 +++ b/drivers/base/component.c
 @@ -293,10 +293,12 @@ int component_master_add_with_match(struct device *dev,
 if (ops-add_components  match)
 return -EINVAL;

 -   /* Reallocate the match array for its true size */
 -   match = component_match_realloc(dev, match, match-num);
 -   if (IS_ERR(match))
 -   return PTR_ERR(match);
 +   if (match) {
 +   /* Reallocate the match array for its true size */
 +   match = component_match_realloc(dev, match, match-num);
 +   if (IS_ERR(match))
 +   return PTR_ERR(match);
 +   }

 master = kzalloc(sizeof(*master), GFP_KERNEL);
 if (!master)


 --
 FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
 improving, and getting towards what was expected from it.



-- 
Regards,
Sachin.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3 3/8] component: add support for component match array

2014-07-04 Thread Sachin Kamat
On Fri, Jul 4, 2014 at 5:55 PM, Russell King - ARM Linux
li...@arm.linux.org.uk wrote:
 On Fri, Jul 04, 2014 at 05:00:36PM +0530, Sachin Kamat wrote:
 On Fri, Jul 4, 2014 at 4:22 PM, Russell King - ARM Linux
 li...@arm.linux.org.uk wrote:
  On Fri, Jul 04, 2014 at 04:17:35PM +0530, Sachin Kamat wrote:
  Hi Russell
 
   +int component_master_add_with_match(struct device *dev,
   +   const struct component_master_ops *ops,
   +   struct component_match *match)
{
   struct master *master;
   int ret;
  
   +   if (ops-add_components  match)
   +   return -EINVAL;
   +
   +   /* Reallocate the match array for its true size */
   +   match = component_match_realloc(dev, match, match-num);
 
 ^
  This gives a NULL pointer dereference error when match is NULL (as passed
  by component_master_add() below). Observed this while testing linux-next
  kernel (next-20140704) on Exynos based board with DRM enabled.
 
  Thanks for your report.  Please verify that the patch below resolves it
  for you.  Thanks.

 Yes, the below patch fixes the crash. Thanks for the fix.

 Thanks.  I'll add a tested-by and reported-by for your address when
 committing this patch.  Let me know if you want something different.

Thanks. Please use the following for the tags:

Sachin Kamat sachin.ka...@samsung.com

-- 
Regards,
Sachin.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/1] staging: emxx_udc: Fix build error

2014-06-30 Thread Sachin Kamat
‘strict_strtol’ is deprecated. Use kstrtol instead. Fixes the following
build error:
drivers/staging/emxx_udc/emxx_udc.c:3288:3: error: implicit declaration of 
function ‘strict_strtol’

Signed-off-by: Sachin Kamat sachin.ka...@samsung.com
---
Compile tested.
---
 drivers/staging/emxx_udc/emxx_udc.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/emxx_udc/emxx_udc.c 
b/drivers/staging/emxx_udc/emxx_udc.c
index ce1b95b0abfc..0003463cd231 100644
--- a/drivers/staging/emxx_udc/emxx_udc.c
+++ b/drivers/staging/emxx_udc/emxx_udc.c
@@ -3285,7 +3285,7 @@ static void __init nbu2ss_drv_set_ep_info(
 
tempbuf[0] = name[2];
tempbuf[1] = '\0';
-   res = strict_strtol(tempbuf, 16, num);
+   res = kstrtol(tempbuf, 16, num);
 
if (num == 0)
ep-ep.maxpacket = EP0_PACKETSIZE;
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/1] staging: emxx_udc: Fix build error

2014-06-23 Thread Sachin Kamat
devm_request_and_ioremap has been removed since commit c9d53c0f2d23
(devres: remove devm_request_and_ioremap()) Use devm_ioremap_resource
instead. While at it, also remove redundant error message as it is now
handled by devm_ioremap_resource. Without this patch we get the following
build error:
drivers/staging/emxx_udc/emxx_udc.c:3370:2: error: implicit declaration of 
function ‘devm_request_and_ioremap’ [-Werror=implicit-function-declaration]

Signed-off-by: Sachin Kamat sachin.ka...@samsung.com
---
Only compile tested.
---
 drivers/staging/emxx_udc/emxx_udc.c |7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/emxx_udc/emxx_udc.c 
b/drivers/staging/emxx_udc/emxx_udc.c
index c92ded8b5b3e..ee0094d8cc6e 100644
--- a/drivers/staging/emxx_udc/emxx_udc.c
+++ b/drivers/staging/emxx_udc/emxx_udc.c
@@ -34,6 +34,7 @@
 #include linux/string.h
 #include linux/dma-mapping.h
 #include linux/workqueue.h
+#include linux/device.h
 
 #include linux/usb/ch9.h
 #include linux/usb/gadget.h
@@ -3367,11 +3368,9 @@ static int nbu2ss_drv_probe(struct platform_device *pdev)
 
/* require I/O memory and IRQ to be provided as resources */
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   mmio_base = devm_request_and_ioremap(pdev-dev, r);
-   if (IS_ERR(mmio_base)) {
-   dev_err(pdev-dev, failed to map I/O memory\n);
+   mmio_base = devm_ioremap_resource(pdev-dev, r);
+   if (IS_ERR(mmio_base))
return PTR_ERR(mmio_base);
-   }
 
irq = platform_get_irq(pdev, 0);
if (irq  0) {
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/1] staging: emxx_udc: Use module_platform_driver

2014-06-23 Thread Sachin Kamat
module_platform_driver removes some boiler plate and makes
code simpler.

Signed-off-by: Sachin Kamat sachin.ka...@samsung.com
---
Compile tested.
---
 drivers/staging/emxx_udc/emxx_udc.c |   19 +--
 1 file changed, 1 insertion(+), 18 deletions(-)

diff --git a/drivers/staging/emxx_udc/emxx_udc.c 
b/drivers/staging/emxx_udc/emxx_udc.c
index ee0094d8cc6e..ce1b95b0abfc 100644
--- a/drivers/staging/emxx_udc/emxx_udc.c
+++ b/drivers/staging/emxx_udc/emxx_udc.c
@@ -3511,24 +3511,7 @@ static struct platform_driver udc_driver = {
},
 };
 
-
-
-/*-*/
-/* module */
-
-/*-*/
-static int __init udc_init(void)
-{
-   return platform_driver_register(udc_driver);
-}
-module_init(udc_init);
-
-/*-*/
-static void __exit udc_exit(void)
-{
-   platform_driver_unregister(udc_driver);
-}
-module_exit(udc_exit);
+module_platform_driver(udc_driver);
 
 MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_AUTHOR(Renesas Electronics Corporation);
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 3/3] staging: bcm: Remove redundant casting in Bcmchar.c

2014-05-29 Thread Sachin Kamat
Casting value returned by kzalloc is useless.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/bcm/Bcmchar.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c
index 606d5f5e9216..c1e01f7d64ba 100644
--- a/drivers/staging/bcm/Bcmchar.c
+++ b/drivers/staging/bcm/Bcmchar.c
@@ -1648,7 +1648,7 @@ static int bcm_char_ioctl_flash2x_section_read(void 
__user *argp,
 
ReadOffset = sFlash2xRead.offset;
OutPutBuff = IoBuffer.OutputBuffer;
-   pReadBuff = (PCHAR)kzalloc(BuffSize , GFP_KERNEL);
+   pReadBuff = kzalloc(BuffSize , GFP_KERNEL);
 
if (pReadBuff == NULL) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0,
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/3] staging: rtl8723au: Remove redundant casting in rtw_mlme.c

2014-05-29 Thread Sachin Kamat
Casting value returned by kzalloc is useless.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8723au/core/rtw_mlme.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_mlme.c 
b/drivers/staging/rtl8723au/core/rtw_mlme.c
index 7170258d2601..1bc35429abd3 100644
--- a/drivers/staging/rtl8723au/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723au/core/rtw_mlme.c
@@ -1818,7 +1818,7 @@ int rtw_set_auth23a(struct rtw_adapter * adapter,
struct cmd_priv *pcmdpriv = adapter-cmdpriv;
int res = _SUCCESS;
 
-   pcmd = (struct cmd_obj *)kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
+   pcmd = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
if (!pcmd) {
res = _FAIL;  /* try again */
goto exit;
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/3] staging: rtl8723au: Remove redundant casting in rtw_mlme_ext.c

2014-05-29 Thread Sachin Kamat
Casting value returned by kzalloc is useless.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8723au/core/rtw_mlme_ext.c |   27 +
 1 file changed, 10 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c 
b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c
index e1b28a234259..9df54ee95c7c 100644
--- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c
@@ -5084,8 +5084,7 @@ void report_survey_event23a(struct rtw_adapter *padapter, 
struct recv_frame *pre
pmlmeext = padapter-mlmeextpriv;
pcmdpriv = padapter-cmdpriv;
 
-   pcmd_obj = (struct cmd_obj *)kzalloc(sizeof(struct cmd_obj),
-GFP_ATOMIC);
+   pcmd_obj = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
if (!pcmd_obj)
return;
 
@@ -5135,8 +5134,7 @@ void report_surveydone_event23a(struct rtw_adapter 
*padapter)
struct mlme_ext_priv*pmlmeext = padapter-mlmeextpriv;
struct cmd_priv *pcmdpriv = padapter-cmdpriv;
 
-   pcmd_obj = (struct cmd_obj *)kzalloc(sizeof(struct cmd_obj),
-GFP_ATOMIC);
+   pcmd_obj = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
if (!pcmd_obj)
return;
 
@@ -5180,8 +5178,7 @@ void report_join_res23a(struct rtw_adapter *padapter, int 
res)
struct mlme_ext_info *pmlmeinfo = pmlmeext-mlmext_info;
struct cmd_priv *pcmdpriv = padapter-cmdpriv;
 
-   pcmd_obj = (struct cmd_obj *)kzalloc(sizeof(struct cmd_obj),
-GFP_ATOMIC);
+   pcmd_obj = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
if (!pcmd_obj)
return;
 
@@ -5230,8 +5227,7 @@ void report_del_sta_event23a(struct rtw_adapter 
*padapter, unsigned char* MacAdd
struct mlme_ext_priv*pmlmeext = padapter-mlmeextpriv;
struct cmd_priv *pcmdpriv = padapter-cmdpriv;
 
-   pcmd_obj = (struct cmd_obj *)kzalloc(sizeof(struct cmd_obj),
-GFP_ATOMIC);
+   pcmd_obj = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
if (!pcmd_obj)
return;
 
@@ -5284,8 +5280,7 @@ void report_add_sta_event23a(struct rtw_adapter 
*padapter, unsigned char* MacAdd
struct mlme_ext_priv*pmlmeext = padapter-mlmeextpriv;
struct cmd_priv *pcmdpriv = padapter-cmdpriv;
 
-   pcmd_obj = (struct cmd_obj *)kzalloc(sizeof(struct cmd_obj),
-GFP_ATOMIC);
+   pcmd_obj = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
if (!pcmd_obj)
return;
 
@@ -5699,13 +5694,12 @@ static void survey_timer_hdl(unsigned long data)
pmlmeext-scan_abort = false;/* reset */
}
 
-   ph2c = (struct cmd_obj *)kzalloc(sizeof(struct cmd_obj),
-   GFP_ATOMIC);
+   ph2c = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
if (!ph2c)
goto exit_survey_timer_hdl;
 
-   psurveyPara = (struct sitesurvey_parm*)
-   kzalloc(sizeof(struct sitesurvey_parm), GFP_ATOMIC);
+   psurveyPara = kzalloc(sizeof(struct sitesurvey_parm),
+   GFP_ATOMIC);
if (!psurveyPara) {
kfree(ph2c);
goto exit_survey_timer_hdl;
@@ -6377,14 +6371,13 @@ int set_tx_beacon_cmd23a(struct rtw_adapter* padapter)
u8 res = _SUCCESS;
int len_diff = 0;
 
-   ph2c = (struct cmd_obj *)kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
+   ph2c = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
if (!ph2c) {
res = _FAIL;
goto exit;
}
 
-   ptxBeacon_parm = (struct Tx_Beacon_param *)
-   kzalloc(sizeof(struct Tx_Beacon_param), GFP_ATOMIC);
+   ptxBeacon_parm = kzalloc(sizeof(struct Tx_Beacon_param), GFP_ATOMIC);
if (!ptxBeacon_parm) {
kfree(ph2c);
res = _FAIL;
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/1] staging: rtl8723au: Remove duplicate inclusion of wlan_bssdef.h

2014-05-28 Thread Sachin Kamat
wlan_bssdef.h was included twice.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8723au/include/drv_types.h |1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8723au/include/drv_types.h 
b/drivers/staging/rtl8723au/include/drv_types.h
index 49add5f..a94857d 100644
--- a/drivers/staging/rtl8723au/include/drv_types.h
+++ b/drivers/staging/rtl8723au/include/drv_types.h
@@ -38,7 +38,6 @@ enum _NIC_VERSION {
 #include rtw_ht.h
 
 #include rtw_cmd.h
-#include wlan_bssdef.h
 #include rtw_xmit.h
 #include rtw_recv.h
 #include hal_intf.h
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/7] staging: rtl8723au: Remove redundant casting in rtw_mlme.c

2014-05-28 Thread Sachin Kamat
Casting value returned by k[cmz]alloc is useless.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8723au/core/rtw_mlme.c |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_mlme.c 
b/drivers/staging/rtl8723au/core/rtw_mlme.c
index 547986a..7170258 100644
--- a/drivers/staging/rtl8723au/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723au/core/rtw_mlme.c
@@ -1824,8 +1824,7 @@ int rtw_set_auth23a(struct rtw_adapter * adapter,
goto exit;
}
 
-   psetauthparm = (struct setauth_parm*)
-   kzalloc(sizeof(struct setauth_parm), GFP_KERNEL);
+   psetauthparm = kzalloc(sizeof(struct setauth_parm), GFP_KERNEL);
if (!psetauthparm) {
kfree(pcmd);
res = _FAIL;
@@ -1866,7 +1865,7 @@ int rtw_set_key23a(struct rtw_adapter *adapter,
goto exit;
}
 
-   pcmd = (struct cmd_obj *)kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
+   pcmd = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
if (!pcmd) {
res = _FAIL;  /* try again */
goto exit;
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/7] staging: rtl8723au: Remove redundant casting in rtw_recv.c

2014-05-28 Thread Sachin Kamat
Casting value returned by k[cmz]alloc is useless.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8723au/core/rtw_recv.c |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_recv.c 
b/drivers/staging/rtl8723au/core/rtw_recv.c
index f21aa20..690970e 100644
--- a/drivers/staging/rtl8723au/core/rtw_recv.c
+++ b/drivers/staging/rtl8723au/core/rtw_recv.c
@@ -58,8 +58,7 @@ int _rtw_init_recv_priv23a(struct recv_priv *precvpriv,
precvpriv-adapter = padapter;
 
for (i = 0; i  NR_RECVFRAME ; i++) {
-   precvframe = (struct recv_frame *)
-   kzalloc(sizeof(struct recv_frame), GFP_KERNEL);
+   precvframe = kzalloc(sizeof(struct recv_frame), GFP_KERNEL);
if (!precvframe)
break;
INIT_LIST_HEAD(precvframe-list);
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 3/7] staging: rtl8723au: Remove redundant casting in rtw_sta_mgt.c

2014-05-28 Thread Sachin Kamat
Casting value returned by k[cmz]alloc is useless.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8723au/core/rtw_sta_mgt.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_sta_mgt.c 
b/drivers/staging/rtl8723au/core/rtw_sta_mgt.c
index b829c2e..14a82be 100644
--- a/drivers/staging/rtl8723au/core/rtw_sta_mgt.c
+++ b/drivers/staging/rtl8723au/core/rtw_sta_mgt.c
@@ -116,7 +116,7 @@ rtw_alloc_stainfo23a(struct sta_priv *pstapriv, u8 *hwaddr, 
gfp_t gfp)
int i = 0;
u16  wRxSeqInitialValue = 0x;
 
-   psta = (struct sta_info *)kmalloc(sizeof(struct sta_info), gfp);
+   psta = kmalloc(sizeof(struct sta_info), gfp);
if (!psta)
return NULL;
 
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 7/7] staging: rtl8723au: Remove redundant casting in usb_ops_linux.c

2014-05-28 Thread Sachin Kamat
Casting value returned by k[cmz]alloc is useless.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8723au/hal/usb_ops_linux.c |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8723au/hal/usb_ops_linux.c 
b/drivers/staging/rtl8723au/hal/usb_ops_linux.c
index 4ba6b47..8e9e61c 100644
--- a/drivers/staging/rtl8723au/hal/usb_ops_linux.c
+++ b/drivers/staging/rtl8723au/hal/usb_ops_linux.c
@@ -382,8 +382,7 @@ static void usb_read_interrupt_complete(struct urb *purb)
struct evt_work *c2w;
int res;
 
-   c2w = (struct evt_work *)
-   kmalloc(sizeof(struct evt_work),
+   c2w = kmalloc(sizeof(struct evt_work),
GFP_ATOMIC);
 
if (!c2w) {
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 4/7] staging: rtl8723au: Remove redundant casting in rtw_wlan_util.c

2014-05-28 Thread Sachin Kamat
Casting value returned by k[cmz]alloc is useless.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8723au/core/rtw_wlan_util.c |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_wlan_util.c 
b/drivers/staging/rtl8723au/core/rtw_wlan_util.c
index 256385c..579a4a8 100644
--- a/drivers/staging/rtl8723au/core/rtw_wlan_util.c
+++ b/drivers/staging/rtl8723au/core/rtw_wlan_util.c
@@ -919,8 +919,7 @@ int rtw_check_bcn_info23a(struct rtw_adapter *Adapter,
return true;
}
 
-   bssid = (struct wlan_bssid_ex *)kzalloc(sizeof(struct wlan_bssid_ex),
-   GFP_ATOMIC);
+   bssid = kzalloc(sizeof(struct wlan_bssid_ex), GFP_ATOMIC);
if (!bssid)
return _FAIL;
 
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 6/7] staging: rtl8723au: Remove redundant casting in rtl8723a_hal_init.c

2014-05-28 Thread Sachin Kamat
Casting value returned by k[cmz]alloc is useless.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c 
b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
index 487629c..0acacab 100644
--- a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
+++ b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
@@ -489,7 +489,7 @@ hal_ReadEFuse_WiFi(struct rtw_adapter *padapter,
return;
}
 
-   efuseTbl = (u8 *) kmalloc(EFUSE_MAP_LEN_8723A, GFP_KERNEL);
+   efuseTbl = kmalloc(EFUSE_MAP_LEN_8723A, GFP_KERNEL);
if (efuseTbl == NULL) {
DBG_8723A(%s: alloc efuseTbl fail!\n, __func__);
return;
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 1/1] staging: imx-drm: Remove unused variable

2014-05-27 Thread Sachin Kamat
On 26 May 2014 23:03, Greg KH gre...@linuxfoundation.org wrote:
 On Mon, May 26, 2014 at 02:28:44PM +0530, Sachin Kamat wrote:
 'ret' is not used in the function. Remove it.

 Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
 ---
  drivers/staging/imx-drm/imx-tve.c |1 -
  1 file changed, 1 deletion(-)

 This doesn't apply properly to my tree, can you refresh it against the
 latest staging-next branch of my staging.git tree and resend it?

Seems like this patch is no longer required on the latest staging-next
and could be
dropped. Sorry for the noise.

-- 
With warm regards,
Sachin
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/3] staging: rtl8723au: Remove unneeded version.h inclusion in osdep_service.h

2014-05-27 Thread Sachin Kamat
version.h inclusion is not needed as detected by versioncheck.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8723au/include/osdep_service.h |1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8723au/include/osdep_service.h 
b/drivers/staging/rtl8723au/include/osdep_service.h
index d85f850..a5ebdb8 100644
--- a/drivers/staging/rtl8723au/include/osdep_service.h
+++ b/drivers/staging/rtl8723au/include/osdep_service.h
@@ -19,7 +19,6 @@
 #define _SUCCESS   1
 #define RTW_RX_HANDLED 2
 
-#include linux/version.h
 #include linux/spinlock.h
 #include linux/compiler.h
 #include linux/kernel.h
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 3/3] staging: rtl8723au: Remove unneeded version.h inclusion in os_intfs.c

2014-05-27 Thread Sachin Kamat
version.h inclusion is not needed as detected by versioncheck.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8723au/os_dep/os_intfs.c |2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/rtl8723au/os_dep/os_intfs.c 
b/drivers/staging/rtl8723au/os_dep/os_intfs.c
index 5b27eb4..4e32003 100644
--- a/drivers/staging/rtl8723au/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723au/os_dep/os_intfs.c
@@ -23,8 +23,6 @@
 
 #include rtl8723a_hal.h
 
-#include linux/version.h
-
 MODULE_LICENSE(GPL);
 MODULE_DESCRIPTION(Realtek Wireless Lan Driver);
 MODULE_AUTHOR(Realtek Semiconductor Corp.);
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/2] staging: rtl8192ee: Remove unneeded version.h inclusion

2014-05-27 Thread Sachin Kamat
version.h inclusion is not needed as detected by versioncheck.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8192ee/wifi.h |1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8192ee/wifi.h b/drivers/staging/rtl8192ee/wifi.h
index 9cb0811..96fa261 100644
--- a/drivers/staging/rtl8192ee/wifi.h
+++ b/drivers/staging/rtl8192ee/wifi.h
@@ -29,7 +29,6 @@
 #include linux/interrupt.h
 #include linux/sched.h
 #include linux/firmware.h
-#include linux/version.h
 #include linux/etherdevice.h
 #include net/mac80211.h
 #include debug.h
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/3] staging: rtl8723au: Remove unneeded version.h inclusion in ioctl_cfg80211.c

2014-05-27 Thread Sachin Kamat
version.h inclusion is not needed as detected by versioncheck.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c |1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c 
b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c
index 4528c95..0c9f5ce 100644
--- a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c
@@ -20,7 +20,6 @@
 #include xmit_osdep.h
 
 #include ioctl_cfg80211.h
-#include linux/version.h
 
 #define RTW_MAX_MGMT_TX_CNT 8
 
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/2] staging: rtl8192ee: Fix build error

2014-05-27 Thread Sachin Kamat
Fixes the followign build error:
drivers/staging/rtl8192ee/btcoexist/halbtc8723b1ant.c:1387:6: error: called 
object is not a function or function pointer
  ([BTCoex], Wifi non connected-idle + BT Busy!!\n));

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 .../staging/rtl8192ee/btcoexist/halbtc8723b1ant.c  |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192ee/btcoexist/halbtc8723b1ant.c 
b/drivers/staging/rtl8192ee/btcoexist/halbtc8723b1ant.c
index d561c54..153048f 100644
--- a/drivers/staging/rtl8192ee/btcoexist/halbtc8723b1ant.c
+++ b/drivers/staging/rtl8192ee/btcoexist/halbtc8723b1ant.c
@@ -1384,7 +1384,7 @@ static bool halbtc8723b1ant_is_common_action(struct 
btc_coexist *btcoexist)
   (BT_8723B_1ANT_BT_STATUS_CONNECTED_IDLE !=
coex_dm-bt_status)) {
BTC_PRINT(BTC_MSG_ALGORITHM, ALGO_TRACE,
- ([BTCoex], Wifi non connected-idle + BT Busy!!\n));
+ [BTCoex], Wifi non connected-idle + BT Busy!!\n);
halbtc8723b1ant_sw_mechanism(btcoexist, false);
commom = true;
} else {
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 01/16] staging: rtl8821ae: base.c: Remove version specific code

2014-05-27 Thread Sachin Kamat
The code should be for the current kernel version. Remove
conditional version based code.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
This series is based on latest staging-next and is compile tested.
---
 drivers/staging/rtl8821ae/base.c |   46 +-
 1 file changed, 1 insertion(+), 45 deletions(-)

diff --git a/drivers/staging/rtl8821ae/base.c b/drivers/staging/rtl8821ae/base.c
index 49ee311..4a36da0 100644
--- a/drivers/staging/rtl8821ae/base.c
+++ b/drivers/staging/rtl8821ae/base.c
@@ -320,9 +320,6 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw)
/* 5 set hw caps */
hw-flags = IEEE80211_HW_SIGNAL_DBM |
IEEE80211_HW_RX_INCLUDES_FCS |
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(3, 4, 0))
-   IEEE80211_HW_BEACON_FILTER |
-#endif
IEEE80211_HW_AMPDU_AGGREGATION |
IEEE80211_HW_REPORTS_TX_ACK_STATUS |
IEEE80211_HW_CONNECTION_MONITOR |
@@ -335,8 +332,6 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw)
IEEE80211_HW_PS_NULLFUNC_STACK |
/* IEEE80211_HW_SUPPORTS_DYNAMIC_PS | */
0;
-/*delete in kernel start*/
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(2, 6, 37))
hw-wiphy-interface_modes =
BIT(NL80211_IFTYPE_AP) |
BIT(NL80211_IFTYPE_STATION) |
@@ -344,23 +339,10 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw)
BIT(NL80211_IFTYPE_MESH_POINT) |
BIT(NL80211_IFTYPE_P2P_CLIENT) |
BIT(NL80211_IFTYPE_P2P_GO);
-#else
-/*delete in kernel end*/
-   hw-wiphy-interface_modes =
-   BIT(NL80211_IFTYPE_AP) |
-   BIT(NL80211_IFTYPE_STATION) |
-   BIT(NL80211_IFTYPE_ADHOC) |
-   BIT(NL80211_IFTYPE_MESH_POINT) ;
-/*delete in kernel start*/
-#endif
-/*delete in kernel end*/
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(2, 6, 39))
+
hw-wiphy-flags |= WIPHY_FLAG_IBSS_RSN;
-#endif
 
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(3, 3, 0))
hw-wiphy-flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;
-#endif
 
hw-wiphy-rts_threshold = 2347;
 
@@ -401,16 +383,8 @@ static int _rtl_init_deferred_work(struct ieee80211_hw *hw)
rtl_easy_concurrent_retrytimer_callback, (unsigned long)hw);
/* 2 work queue */
rtlpriv-works.hw = hw;
-/*delete in kernel start*/
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(2, 6, 37))
-/*delete in kernel end*/
rtlpriv-works.rtl_wq = alloc_workqueue(%s, 0, 0,
rtlpriv-cfg-name);
-/*delete in kernel start*/
-#else
-   rtlpriv-works.rtl_wq = create_workqueue(rtlpriv-cfg-name);
-#endif
-/*delete in kernel end*/
if (!rtlpriv-works.rtl_wq)
return -ENOMEM;
 
@@ -901,13 +875,8 @@ bool rtl_action_proc(struct ieee80211_hw *hw, struct 
sk_buff *skb, u8 is_tx)
hdr-addr3,
tid);
if (skb_delba) {
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(3, 10, 0))
rx_status.freq = 
hw-conf.chandef.chan-center_freq;
rx_status.band = 
hw-conf.chandef.chan-band;
-#else
-   rx_status.freq = 
hw-conf.channel-center_freq;
-   rx_status.band = 
hw-conf.channel-band;
-#endif
rx_status.flag |= 
RX_FLAG_DECRYPTED;
rx_status.flag |= 
RX_FLAG_MACTIME_MPDU;
rx_status.rate_idx = 0;
@@ -1482,21 +1451,8 @@ int rtl_send_smps_action(struct ieee80211_hw *hw,
/* rtlpriv-cfg-ops-update_rate_tbl(hw, sta, 0); */
 
info-control.rates[0].idx = 0;
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(3, 10, 0))
info-band = hw-conf.chandef.chan-band;
-#else
-   info-band = hw-conf.channel-band;
-#endif
-/*delete in kernel start*/
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(3, 7, 0))
-   info-control.sta = sta;
-   rtlpriv-intf_ops-adapter_tx(hw, skb, tcb_desc);
-#else
-/*delete in kernel end*/
rtlpriv-intf_ops-adapter_tx(hw, sta, skb, tcb_desc);
-/*delete in kernel start*/
-#endif
-/*delete in kernel end*/
}
return 1;
 
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 02/16] staging: rtl8821ae: cam.c: Remove version specific code

2014-05-27 Thread Sachin Kamat
The code should be for the current kernel version. Remove
conditional version based code.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8821ae/cam.c |2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/rtl8821ae/cam.c b/drivers/staging/rtl8821ae/cam.c
index 72743e7..3bc6b3d 100644
--- a/drivers/staging/rtl8821ae/cam.c
+++ b/drivers/staging/rtl8821ae/cam.c
@@ -28,9 +28,7 @@
  */
 #include wifi.h
 #include cam.h
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(3,2,0))
 #include linux/export.h
-#endif
 
 void rtl_cam_reset_sec_info(struct ieee80211_hw *hw)
 {
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 05/16] staging: rtl8821ae: debug.c: Remove version specific code

2014-05-27 Thread Sachin Kamat
The code should be for the current kernel version. Remove
conditional version based code.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8821ae/debug.c |5 -
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/rtl8821ae/debug.c 
b/drivers/staging/rtl8821ae/debug.c
index 8a6c794..8aefbf1 100644
--- a/drivers/staging/rtl8821ae/debug.c
+++ b/drivers/staging/rtl8821ae/debug.c
@@ -30,12 +30,7 @@
 #include wifi.h
 #include cam.h
 
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(3,10,0))
 #define GET_INODE_DATA(__node) PDE_DATA(__node)
-#else
-#define GET_INODE_DATA(__node) PDE(__node)-data
-#endif
-
 
 void rtl_dbgp_flag_init(struct ieee80211_hw *hw)
 {
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 03/16] staging: rtl8821ae: compat.h: Remove version specific code

2014-05-27 Thread Sachin Kamat
The code should be for the current kernel version. Remove
conditional version based code.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8821ae/compat.h |   57 
 1 file changed, 57 deletions(-)

diff --git a/drivers/staging/rtl8821ae/compat.h 
b/drivers/staging/rtl8821ae/compat.h
index 68269cc..ffb5f8b 100644
--- a/drivers/staging/rtl8821ae/compat.h
+++ b/drivers/staging/rtl8821ae/compat.h
@@ -1,65 +1,8 @@
 #ifndef __RTL_COMPAT_H__
 #define __RTL_COMPAT_H__
 
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(2,6,29))
-/*
- * Use this if you want to use the same suspend and resume callbacks for 
suspend
- * to RAM and hibernation.
- */
-#define SIMPLE_DEV_PM_OPS(name, suspend_fn, resume_fn) \
-struct dev_pm_ops name = { \
-   .suspend = suspend_fn, \
-   .resume = resume_fn, \
-   .freeze = suspend_fn, \
-   .thaw = resume_fn, \
-   .poweroff = suspend_fn, \
-   .restore = resume_fn, \
-}
-
-#define compat_pci_suspend(fn) \
-   int fn##_compat(struct pci_dev *pdev, pm_message_t state)   \
-   {   \
-   int r;  \
-   \
-   r = fn(pdev-dev); \
-   if (r)  \
-   return r;   \
-   \
-   pci_save_state(pdev);   \
-   pci_disable_device(pdev);   \
-   pci_set_power_state(pdev, PCI_D3hot);   \
-   \
-   return 0;   \
-   }
-
-#define compat_pci_resume(fn)  \
-   int fn##_compat(struct pci_dev *pdev)   \
-   {   \
-   int r;  \
-   \
-   pci_set_power_state(pdev, PCI_D0);  \
-   r = pci_enable_device(pdev);\
-   if (r)  \
-   return r;   \
-   pci_restore_state(pdev);\
-   \
-   return fn(pdev-dev);  \
-   }
-#endif
-
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(2,6,39))
-#define RX_FLAG_MACTIME_MPDU RX_FLAG_TSFT
-#else
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(3,8,0))
 #define RX_FLAG_MACTIME_MPDU RX_FLAG_MACTIME_START
-#else
-#endif
-//#define NETDEV_TX_OK
-#endif
-
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(3,7,0))
 #define IEEE80211_KEY_FLAG_SW_MGMT IEEE80211_KEY_FLAG_SW_MGMT_TX
-#endif
 
 struct ieee80211_mgmt_compat {
__le16 frame_control;
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 04/16] staging: rtl8821ae: core.c: Remove version specific code

2014-05-27 Thread Sachin Kamat
The code should be for the current kernel version. Remove
conditional version based code.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8821ae/core.c |  156 +-
 1 file changed, 2 insertions(+), 154 deletions(-)

diff --git a/drivers/staging/rtl8821ae/core.c b/drivers/staging/rtl8821ae/core.c
index ff3139b..9a37408 100644
--- a/drivers/staging/rtl8821ae/core.c
+++ b/drivers/staging/rtl8821ae/core.c
@@ -88,42 +88,9 @@ static void rtl_op_stop(struct ieee80211_hw *hw)
mutex_unlock(rtlpriv-locks.conf_mutex);
 }
 
-/*delete in kernel start*/
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(2,6,39))
-static int rtl_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
-{
-   struct rtl_priv *rtlpriv = rtl_priv(hw);
-   struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
-   struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
-   struct rtl_tcb_desc tcb_desc;
-   memset(tcb_desc, 0, sizeof(struct rtl_tcb_desc));
-
-   if (unlikely(is_hal_stop(rtlhal) || ppsc-rfpwr_state != ERFON))
-   goto err_free;
-
-   if (!test_bit(RTL_STATUS_INTERFACE_START, rtlpriv-status))
-   goto err_free;
-
-   if (!rtlpriv-intf_ops-waitq_insert(hw, skb))
-   rtlpriv-intf_ops-adapter_tx(hw, skb, tcb_desc);
-
-   return NETDEV_TX_OK;
-
-err_free:
-   dev_kfree_skb_any(skb);
-   return NETDEV_TX_OK;
-}
-#else
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(3,7,0))
-static void rtl_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
-#else
-/*delete in kernel end*/
 static void rtl_op_tx(struct ieee80211_hw *hw,
  struct ieee80211_tx_control *control,
  struct sk_buff *skb)
-/*delete in kernel start*/
-#endif
-/*delete in kernel end*/
 {
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
@@ -137,26 +104,14 @@ static void rtl_op_tx(struct ieee80211_hw *hw,
if (!test_bit(RTL_STATUS_INTERFACE_START, rtlpriv-status))
goto err_free;
 
-/*delete in kernel start*/
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(3,7,0))
-   if (!rtlpriv-intf_ops-waitq_insert(hw, skb))
-   rtlpriv-intf_ops-adapter_tx(hw, skb, tcb_desc);
-#else
-/*delete in kernel end*/
if (!rtlpriv-intf_ops-waitq_insert(hw, control-sta, skb))
rtlpriv-intf_ops-adapter_tx(hw, control-sta, skb, tcb_desc);
-/*delete in kernel start*/
-#endif
-/*delete in kernel end*/
return;
 
 err_free:
dev_kfree_skb_any(skb);
return;
 }
-/*delete in kernel start*/
-#endif
-/*delete in kernel end*/
 
 static int rtl_op_add_interface(struct ieee80211_hw *hw,
struct ieee80211_vif *vif)
@@ -171,26 +126,15 @@ static int rtl_op_add_interface(struct ieee80211_hw *hw,
return -EOPNOTSUPP;
}
 
-/*This flag is not defined before kernel 3.4*/
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(3,4,0))
vif-driver_flags |= IEEE80211_VIF_BEACON_FILTER;
-#endif
 
rtl_ips_nic_on(hw);
 
mutex_lock(rtlpriv-locks.conf_mutex);
-/*delete in kernel start*/
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(2,6,37))
switch (ieee80211_vif_type_p2p(vif)) {
case NL80211_IFTYPE_P2P_CLIENT:
mac-p2p = P2P_ROLE_CLIENT;
/*fall through*/
-#else
-/*delete in kernel end*/
-   switch (vif-type) {
-/*delete in kernel start*/
-#endif
-/*delete in kernel end*/
case NL80211_IFTYPE_STATION:
if (mac-beacon_enabled == 1) {
RT_TRACE(COMP_MAC80211, DBG_LOUD,
@@ -214,13 +158,9 @@ static int rtl_op_add_interface(struct ieee80211_hw *hw,
(u8 *) (mac-basic_rates));
 
break;
-/*delete in kernel start*/
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(2,6,37))
case NL80211_IFTYPE_P2P_GO:
mac-p2p = P2P_ROLE_GO;
/*fall through*/
-#endif
-/*delete in kernel end*/
case NL80211_IFTYPE_AP:
RT_TRACE(COMP_MAC80211, DBG_LOUD,
 (NL80211_IFTYPE_AP \n));
@@ -310,9 +250,7 @@ static void rtl_op_remove_interface(struct ieee80211_hw *hw,
 
mutex_unlock(rtlpriv-locks.conf_mutex);
 }
-/*delete in kernel start*/
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(2,6,37))
-/*delete in kernel end*/
+
 static int rtl_op_change_interface(struct ieee80211_hw *hw,
   struct ieee80211_vif *vif,
   enum nl80211_iftype new_type, bool p2p)
@@ -328,9 +266,7 @@ static int rtl_op_change_interface(struct ieee80211_hw *hw,
 ( p2p  %x\n,p2p));
return ret;
 }
-/*delete in kernel start*/
-#endif
-/*delete in kernel end*/
+
 static int rtl_op_config(struct ieee80211_hw *hw, u32 changed)
 {
struct rtl_priv *rtlpriv = rtl_priv(hw);
@@ -398,14 +334,9 @@ static int rtl_op_config(struct ieee80211_hw *hw, u32 
changed

[PATCH 15/16] staging: rtl8821ae: trx.h: Remove version specific code

2014-05-27 Thread Sachin Kamat
The code should be for the current kernel version. Remove
conditional version based code.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8821ae/rtl8821ae/trx.h |   11 ---
 1 file changed, 11 deletions(-)

diff --git a/drivers/staging/rtl8821ae/rtl8821ae/trx.h 
b/drivers/staging/rtl8821ae/rtl8821ae/trx.h
index da93e5c..af01784 100644
--- a/drivers/staging/rtl8821ae/rtl8821ae/trx.h
+++ b/drivers/staging/rtl8821ae/rtl8821ae/trx.h
@@ -609,23 +609,12 @@ struct rx_desc_8821ae {
 
 } __packed;
 
-/*delete in kernel start*/
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(3,7,0))
-void rtl8821ae_tx_fill_desc(struct ieee80211_hw *hw,
- struct ieee80211_hdr *hdr, u8 *pdesc_tx, u8 *txbd,
- struct ieee80211_tx_info *info, struct sk_buff *skb,
- u8 hw_queue, struct rtl_tcb_desc *ptcb_desc);
-#else
-/*delete in kernel end*/
 void rtl8821ae_tx_fill_desc(struct ieee80211_hw *hw,
  struct ieee80211_hdr *hdr, u8 *pdesc_tx, u8 *txbd,
  struct ieee80211_tx_info *info,
  struct ieee80211_sta *sta,
  struct sk_buff *skb,
  u8 hw_queue, struct rtl_tcb_desc *ptcb_desc);
-/*delete in kernel start*/
-#endif
-/*delete in kernel end*/
 bool rtl8821ae_rx_query_desc(struct ieee80211_hw *hw,
   struct rtl_stats *status,
   struct ieee80211_rx_status *rx_status,
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 09/16] staging: rtl8821ae: ps.c: Remove version specific code

2014-05-27 Thread Sachin Kamat
The code should be for the current kernel version. Remove
conditional version based code.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8821ae/ps.c |   26 --
 1 file changed, 26 deletions(-)

diff --git a/drivers/staging/rtl8821ae/ps.c b/drivers/staging/rtl8821ae/ps.c
index 7876442..5a9bbf0 100644
--- a/drivers/staging/rtl8821ae/ps.c
+++ b/drivers/staging/rtl8821ae/ps.c
@@ -30,9 +30,7 @@
 #include wifi.h
 #include base.h
 #include ps.h
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(3,2,0))
 #include linux/export.h
-#endif
 #include btcoexist/rtl_btc.h
 
 bool rtl_ps_enable_nic(struct ieee80211_hw *hw)
@@ -542,17 +540,8 @@ void rtl_swlps_beacon(struct ieee80211_hw *hw, void *data, 
unsigned int len)
tim_len = tim[1];
tim_ie = (struct ieee80211_tim_ie *) tim[2];
 
-/*delete in kernel start*/
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(2,6,35))
-/*delete in kernel end*/
if (!WARN_ON_ONCE(!hw-conf.ps_dtim_period))
rtlpriv-psc.dtim_counter = tim_ie-dtim_count;
-/*delete in kernel start*/
-#else
-   if (!WARN_ON_ONCE(!mac-vif-bss_conf.dtim_period))
-   rtlpriv-psc.dtim_counter = tim_ie-dtim_count;
-#endif
-/*delete in kernel end*/
 
/* Check whenever the PHY can be turned off again. */
 
@@ -656,9 +645,6 @@ void rtl_swlps_rf_sleep(struct ieee80211_hw *hw)
 * time to sleep_intv = rtlpriv-psc.dtim_counter or
 * MAX_SW_LPS_SLEEP_INTV(default set to 5) */
 
-/*delete in kernel start*/
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(2,6,35))
-/*delete in kernel end*/
if (rtlpriv-psc.dtim_counter == 0) {
if (hw-conf.ps_dtim_period == 1)
sleep_intv = hw-conf.ps_dtim_period * 2;
@@ -667,18 +653,6 @@ void rtl_swlps_rf_sleep(struct ieee80211_hw *hw)
} else {
sleep_intv = rtlpriv-psc.dtim_counter;
}
-/*delete in kernel start*/
-#else
-   if (rtlpriv-psc.dtim_counter == 0) {
-   if (mac-vif-bss_conf.dtim_period == 1)
-   sleep_intv = mac-vif-bss_conf.dtim_period * 2;
-   else
-   sleep_intv = mac-vif-bss_conf.dtim_period;
-   } else {
-   sleep_intv = rtlpriv-psc.dtim_counter;
-   }
-#endif
-/*delete in kernel end*/
 
if (sleep_intv  MAX_SW_LPS_SLEEP_INTV)
sleep_intv = MAX_SW_LPS_SLEEP_INTV;
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 06/16] staging: rtl8821ae: efuse.c: Remove version specific code

2014-05-27 Thread Sachin Kamat
The code should be for the current kernel version. Remove
conditional version based code.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8821ae/efuse.c |2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/rtl8821ae/efuse.c 
b/drivers/staging/rtl8821ae/efuse.c
index 250aae1..206012c 100644
--- a/drivers/staging/rtl8821ae/efuse.c
+++ b/drivers/staging/rtl8821ae/efuse.c
@@ -29,9 +29,7 @@
 #include wifi.h
 #include efuse.h
 #include btcoexist/halbt_precomp.h
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(3,2,0))
 #include linux/export.h
-#endif
 
 static const u8 MAX_PGPKT_SIZE = 9;
 static const u8 PGPKT_DATA_SIZE = 8;
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 11/16] staging: rtl8821ae: regd.c: Remove version specific code

2014-05-27 Thread Sachin Kamat
The code should be for the current kernel version. Remove
conditional version based code.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8821ae/regd.c |   52 --
 1 file changed, 52 deletions(-)

diff --git a/drivers/staging/rtl8821ae/regd.c b/drivers/staging/rtl8821ae/regd.c
index 0a4b398..2efa5f3 100644
--- a/drivers/staging/rtl8821ae/regd.c
+++ b/drivers/staging/rtl8821ae/regd.c
@@ -158,11 +158,6 @@ static void _rtl_reg_apply_beaconing_flags(struct wiphy 
*wiphy,
const struct ieee80211_reg_rule *reg_rule;
struct ieee80211_channel *ch;
unsigned int i;
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(3,9,0))
-   u32 bandwidth = 0;
-   int r;
-#endif
-
for (band = 0; band  IEEE80211_NUM_BANDS; band++) {
 
if (!wiphy-bands[band])
@@ -176,16 +171,9 @@ static void _rtl_reg_apply_beaconing_flags(struct wiphy 
*wiphy,
(ch-flags  IEEE80211_CHAN_RADAR))
continue;
if (initiator == NL80211_REGDOM_SET_BY_COUNTRY_IE) {
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(3,9,0))
reg_rule = freq_reg_info(wiphy, 
ch-center_freq);
if (IS_ERR(reg_rule))
continue;
-#else
-   r = freq_reg_info(wiphy, ch-center_freq,
- bandwidth, reg_rule);
-   if (r)
-   continue;
-#endif
 
/*
 *If 11d had a rule for this channel ensure
@@ -219,10 +207,6 @@ static void _rtl_reg_apply_active_scan_flags(struct wiphy 
*wiphy,
struct ieee80211_supported_band *sband;
struct ieee80211_channel *ch;
const struct ieee80211_reg_rule *reg_rule;
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(3,9,0))
-   u32 bandwidth = 0;
-   int r;
-#endif
 
if (!wiphy-bands[IEEE80211_BAND_2GHZ])
return;
@@ -250,26 +234,16 @@ static void _rtl_reg_apply_active_scan_flags(struct wiphy 
*wiphy,
 */
 
ch = sband-channels[11];  /* CH 12 */
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(3,9,0))
reg_rule = freq_reg_info(wiphy, ch-center_freq);
if (!IS_ERR(reg_rule)) {
-#else
-   r = freq_reg_info(wiphy, ch-center_freq, bandwidth, reg_rule);
-   if (!r) {
-#endif
if (!(reg_rule-flags  NL80211_RRF_PASSIVE_SCAN))
if (ch-flags  IEEE80211_CHAN_PASSIVE_SCAN)
ch-flags = ~IEEE80211_CHAN_PASSIVE_SCAN;
}
 
ch = sband-channels[12];  /* CH 13 */
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(3,9,0))
reg_rule = freq_reg_info(wiphy, ch-center_freq);
if (!IS_ERR(reg_rule)) {
-#else
-   r = freq_reg_info(wiphy, ch-center_freq, bandwidth, reg_rule);
-   if (!r) {
-#endif
if (!(reg_rule-flags  NL80211_RRF_PASSIVE_SCAN))
if (ch-flags  IEEE80211_CHAN_PASSIVE_SCAN)
ch-flags = ~IEEE80211_CHAN_PASSIVE_SCAN;
@@ -389,19 +363,11 @@ static const struct ieee80211_regdomain 
*_rtl_regdomain_select(
}
 }
 
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(3,9,0))
 static int _rtl_regd_init_wiphy(struct rtl_regulatory *reg,
struct wiphy *wiphy,
void (*reg_notifier) (struct wiphy * wiphy,
 struct regulatory_request *
 request))
-#else
-static int _rtl_regd_init_wiphy(struct rtl_regulatory *reg,
-   struct wiphy *wiphy,
-   int (*reg_notifier) (struct wiphy * wiphy,
-struct regulatory_request *
-request))
-#endif
 {
const struct ieee80211_regdomain *regd;
 
@@ -429,15 +395,9 @@ static struct country_code_to_enum_rd 
*_rtl_regd_find_country(u16 countrycode)
return NULL;
 }
 
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(3,9,0))
 int rtl_regd_init(struct ieee80211_hw *hw,
  void (*reg_notifier) (struct wiphy *wiphy,
struct regulatory_request *request))
-#else
-int rtl_regd_init(struct ieee80211_hw *hw,
- int (*reg_notifier) (struct wiphy *wiphy,
-  struct regulatory_request *request))
-#endif
 {
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct wiphy *wiphy = hw-wiphy;
@@ -480,7 +440,6 @@ int rtl_regd_init(struct ieee80211_hw *hw,
return 0;
 }
 
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(3,9,0))
 void rtl_reg_notifier(struct wiphy *wiphy, struct regulatory_request *request)
 {
struct

[PATCH 10/16] staging: rtl8821ae: rc.c: Remove version specific code

2014-05-27 Thread Sachin Kamat
The code should be for the current kernel version. Remove
conditional version based code.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8821ae/rc.c |   18 --
 1 file changed, 18 deletions(-)

diff --git a/drivers/staging/rtl8821ae/rc.c b/drivers/staging/rtl8821ae/rc.c
index a5a09ba..0b4f321 100644
--- a/drivers/staging/rtl8821ae/rc.c
+++ b/drivers/staging/rtl8821ae/rc.c
@@ -210,16 +210,8 @@ static void rtl_tx_status(void *ppriv,
   tid)) {
sta_entry-tids[tid].agg.agg_state =
RTL_AGG_PROGRESS;
-   /*delete in kernel start*/
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(2,6,38))
-   /*delete in kernel end*/
ieee80211_start_tx_ba_session(sta, tid,
  5000);
-   /*delete in kernel start*/
-#else
-   ieee80211_start_tx_ba_session(sta, tid);
-#endif
-   /*delete in kernel end*/
}
}
}
@@ -232,15 +224,6 @@ static void rtl_rate_init(void *ppriv,
  struct ieee80211_sta *sta, void *priv_sta)
 {
 }
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(3,5,0))
-static void rtl_rate_update(void *ppriv,
-   struct ieee80211_supported_band *sband,
-   struct ieee80211_sta *sta, void *priv_sta,
-   u32 changed,
-   enum nl80211_channel_type oper_chan_type)
-{
-}
-#else
 static void rtl_rate_update(void *ppriv,
struct ieee80211_supported_band *sband,
struct cfg80211_chan_def *chandef,
@@ -248,7 +231,6 @@ static void rtl_rate_update(void *ppriv,
u32 changed)
 {
 }
-#endif
 static void *rtl_rate_alloc(struct ieee80211_hw *hw, struct dentry *debugfsdir)
 {
struct rtl_priv *rtlpriv = rtl_priv(hw);
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 08/16] staging: rtl8821ae: pci.h: Remove version specific code

2014-05-27 Thread Sachin Kamat
The code should be for the current kernel version. Remove
conditional version based code.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8821ae/pci.h |5 -
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/rtl8821ae/pci.h b/drivers/staging/rtl8821ae/pci.h
index 06eaa52..3f16ec9 100644
--- a/drivers/staging/rtl8821ae/pci.h
+++ b/drivers/staging/rtl8821ae/pci.h
@@ -282,13 +282,8 @@ int rtl_pci_reset_trx_ring(struct ieee80211_hw *hw);
 
 extern struct rtl_intf_ops rtl_pci_ops;
 
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(3,8,0))
 int rtl_pci_probe(struct pci_dev *pdev,
   const struct pci_device_id *id);
-#else
-int __devinit rtl_pci_probe(struct pci_dev *pdev,
-   const struct pci_device_id *id);
-#endif
 void rtl_pci_disconnect(struct pci_dev *pdev);
 int rtl_pci_suspend(struct device *dev);
 int rtl_pci_resume(struct device *dev);
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 16/16] staging: rtl8821ae: stats.c: Remove version specific code

2014-05-27 Thread Sachin Kamat
The code should be for the current kernel version. Remove
conditional version based code.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8821ae/stats.c |2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/rtl8821ae/stats.c 
b/drivers/staging/rtl8821ae/stats.c
index a20c0f8..4d383d1 100644
--- a/drivers/staging/rtl8821ae/stats.c
+++ b/drivers/staging/rtl8821ae/stats.c
@@ -28,9 +28,7 @@
  */
 #include wifi.h
 #include stats.h
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(3,2,0))
 #include linux/export.h
-#endif
 
 u8 rtl_query_rxpwrpercentage(char antpower)
 {
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/1] staging: imx-drm: Remove unused variable

2014-05-26 Thread Sachin Kamat
'ret' is not used in the function. Remove it.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/imx-drm/imx-tve.c |1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/imx-drm/imx-tve.c 
b/drivers/staging/imx-drm/imx-tve.c
index 3e8b0a1a457f..4caef2b1653d 100644
--- a/drivers/staging/imx-drm/imx-tve.c
+++ b/drivers/staging/imx-drm/imx-tve.c
@@ -249,7 +249,6 @@ static int imx_tve_connector_mode_valid(struct 
drm_connector *connector,
 {
struct imx_tve *tve = con_to_tve(connector);
unsigned long rate;
-   int ret;
 
/* pixel clock with 2x oversampling */
rate = clk_round_rate(tve-clk, 2000UL * mode-clock) / 2000;
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 1/2] staging: android: binder: remove unnecessary comment

2014-02-18 Thread Sachin Kamat
On 19 February 2014 05:58, SeongJae Park sj38.p...@gmail.com wrote:
 On Wed, Feb 19, 2014 at 2:07 AM, Greg KH gre...@linuxfoundation.org wrote:
 On Tue, Feb 18, 2014 at 08:23:25PM +0900, SeongJae Park wrote:
 Signed-off-by: SeongJae Park sj38.p...@gmail.com
 ---
  drivers/staging/android/binder.c | 2 --
  1 file changed, 2 deletions(-)

 diff --git a/drivers/staging/android/binder.c 
 b/drivers/staging/android/binder.c
 index eaec1da..b23cbc9 100644
 --- a/drivers/staging/android/binder.c
 +++ b/drivers/staging/android/binder.c
 @@ -2553,8 +2553,6 @@ static long binder_ioctl(struct file *filp, unsigned 
 int cmd, unsigned long arg)
   unsigned int size = _IOC_SIZE(cmd);
   void __user *ubuf = (void __user *)arg;

 - /*pr_info(binder_ioctl: %d:%d %x %lx\n, proc-pid, current-pid, 
 cmd, arg);*/

 It's useful for debugging, I'll leave it as-is, sorry.

Or just convert pr_info to pr_debug and leave uncommented?

-- 
With warm regards,
Sachin
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 06/16] Staging: rtl8821ae: Remove version specific code from efuse.c

2014-02-17 Thread Sachin Kamat
The code should be for the current kernel version. Remove
conditional version based code.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8821ae/efuse.c |4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8821ae/efuse.c 
b/drivers/staging/rtl8821ae/efuse.c
index 74c19ecc95a9..12e19d0ca73b 100644
--- a/drivers/staging/rtl8821ae/efuse.c
+++ b/drivers/staging/rtl8821ae/efuse.c
@@ -26,12 +26,10 @@
  * Larry Finger larry.fin...@lwfinger.net
  *
  */
+#include linux/export.h
 #include wifi.h
 #include efuse.h
 #include btcoexist/halbt_precomp.h
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(3,2,0))
-#include linux/export.h
-#endif
 
 static const u8 MAX_PGPKT_SIZE = 9;
 static const u8 PGPKT_DATA_SIZE = 8;
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 09/16] Staging: rtl8821ae: Remove version specific code from ps.c

2014-02-17 Thread Sachin Kamat
The code should be for the current kernel version. Remove
conditional version based code.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8821ae/ps.c |   28 +---
 1 file changed, 1 insertion(+), 27 deletions(-)

diff --git a/drivers/staging/rtl8821ae/ps.c b/drivers/staging/rtl8821ae/ps.c
index f12ffa83c58d..23552ffe1cdd 100644
--- a/drivers/staging/rtl8821ae/ps.c
+++ b/drivers/staging/rtl8821ae/ps.c
@@ -27,12 +27,10 @@
  *
  */
 
+#include linux/export.h
 #include wifi.h
 #include base.h
 #include ps.h
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(3,2,0))
-#include linux/export.h
-#endif
 #include btcoexist/rtl_btc.h
 
 bool rtl_ps_enable_nic(struct ieee80211_hw *hw)
@@ -542,17 +540,8 @@ void rtl_swlps_beacon(struct ieee80211_hw *hw, void *data, 
unsigned int len)
tim_len = tim[1];
tim_ie = (struct ieee80211_tim_ie *) tim[2];
 
-/*delete in kernel start*/
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(2,6,35))
-/*delete in kernel end*/
if (!WARN_ON_ONCE(!hw-conf.ps_dtim_period))
rtlpriv-psc.dtim_counter = tim_ie-dtim_count;
-/*delete in kernel start*/
-#else
-   if (!WARN_ON_ONCE(!mac-vif-bss_conf.dtim_period))
-   rtlpriv-psc.dtim_counter = tim_ie-dtim_count;
-#endif
-/*delete in kernel end*/
 
/* Check whenever the PHY can be turned off again. */
 
@@ -656,9 +645,6 @@ void rtl_swlps_rf_sleep(struct ieee80211_hw *hw)
 * time to sleep_intv = rtlpriv-psc.dtim_counter or
 * MAX_SW_LPS_SLEEP_INTV(default set to 5) */
 
-/*delete in kernel start*/
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(2,6,35))
-/*delete in kernel end*/
if (rtlpriv-psc.dtim_counter == 0) {
if (hw-conf.ps_dtim_period == 1)
sleep_intv = hw-conf.ps_dtim_period * 2;
@@ -667,18 +653,6 @@ void rtl_swlps_rf_sleep(struct ieee80211_hw *hw)
} else {
sleep_intv = rtlpriv-psc.dtim_counter;
}
-/*delete in kernel start*/
-#else
-   if (rtlpriv-psc.dtim_counter == 0) {
-   if (mac-vif-bss_conf.dtim_period == 1)
-   sleep_intv = mac-vif-bss_conf.dtim_period * 2;
-   else
-   sleep_intv = mac-vif-bss_conf.dtim_period;
-   } else {
-   sleep_intv = rtlpriv-psc.dtim_counter;
-   }
-#endif
-/*delete in kernel end*/
 
if (sleep_intv  MAX_SW_LPS_SLEEP_INTV)
sleep_intv = MAX_SW_LPS_SLEEP_INTV;
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 07/16] Staging: rtl8821ae: Remove version specific code from pci.c

2014-02-17 Thread Sachin Kamat
The code should be for the current kernel version. Remove
conditional version based code.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8821ae/pci.c |  122 +--
 1 file changed, 1 insertion(+), 121 deletions(-)

diff --git a/drivers/staging/rtl8821ae/pci.c b/drivers/staging/rtl8821ae/pci.c
index 618a3cb4a0c0..dbec8e2d604b 100644
--- a/drivers/staging/rtl8821ae/pci.c
+++ b/drivers/staging/rtl8821ae/pci.c
@@ -27,15 +27,13 @@
  *
  */
 
+#include linux/export.h
 #include core.h
 #include wifi.h
 #include pci.h
 #include base.h
 #include ps.h
 #include efuse.h
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(3,2,0))
-#include linux/export.h
-#endif
 
 static const u16 pcibridge_vendors[PCI_BRIDGE_VENDOR_MAX] = {
INTEL_VENDOR_ID,
@@ -364,47 +362,6 @@ static bool rtl_pci_get_amd_l1_patch(struct ieee80211_hw 
*hw)
return status;
 }
 
-/*delete in kernel start*/
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(2,6,35))
-static u8 _rtl_pci_get_pciehdr_offset(struct ieee80211_hw *hw)
-{
-   u8 capability_offset;
-   u8 num4bytes = 0x34/4;
-   struct rtl_pci_priv *pcipriv = rtl_pcipriv(hw);
-   u32 pcicfg_addr_port = (pcipriv-ndis_adapter.pcibridge_busnum  16)|
-  (pcipriv-ndis_adapter.pcibridge_devnum  11)|
-  (pcipriv-ndis_adapter.pcibridge_funcnum  8)|
-  (1  31);
-
-   rtl_pci_raw_write_port_ulong(PCI_CONF_ADDRESS , pcicfg_addr_port
-   + (num4bytes  2));
-   rtl_pci_raw_read_port_uchar(PCI_CONF_DATA, capability_offset);
-   while (capability_offset != 0) {
-   struct rtl_pci_capabilities_header capability_hdr;
-
-   num4bytes = capability_offset / 4;
-   /* Read the header of the capability at  this offset.
-* If the retrieved capability is not the power management
-* capability that we are looking for, follow the link to
-* the next capability and continue looping.
-*/
-   rtl_pci_raw_write_port_ulong(PCI_CONF_ADDRESS ,
-pcicfg_addr_port +
-(num4bytes  2));
-   rtl_pci_raw_read_port_ushort(PCI_CONF_DATA,
-(u16*)capability_hdr);
-   /* Found the PCI express capability. */
-   if (capability_hdr.capability_id ==
-   PCI_CAPABILITY_ID_PCI_EXPRESS)
-   break;
-   else
-   capability_offset = capability_hdr.next;
-   }
-   return capability_offset;
-}
-#endif
-/*delete in kernel end*/
-
 bool rtl_pci_check_buddy_priv(struct ieee80211_hw *hw,
  struct rtl_priv **buddy_priv)
 {
@@ -610,14 +567,7 @@ static void _rtl_pci_tx_chk_waitq(struct ieee80211_hw *hw)
_rtl_pci_update_earlymode_info(hw, skb,
   tcb_desc, tid);
 
-/*delete in kernel start*/
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(3,7,0))
-   rtlpriv-intf_ops-adapter_tx(hw, skb, tcb_desc);
-#else
-/*delete in kernel end*/
rtlpriv-intf_ops-adapter_tx(hw, NULL, skb, tcb_desc);
-#endif
-/*delete in kernel end*/
}
}
 }
@@ -1201,19 +1151,9 @@ static void _rtl_pci_prepare_bcn_tasklet(struct 
ieee80211_hw *hw)
if (rtlpriv-use_new_trx_flow)
pbuffer_desc = ring-buffer_desc[0];
 
-/*delete in kernel start*/
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(3,7,0))
-   rtlpriv-cfg-ops-fill_tx_desc(hw, hdr, (u8 *) pdesc,
-   (u8 *)pbuffer_desc, info, pskb,
-   BEACON_QUEUE, tcb_desc);
-#else
-/*delete in kernel end*/
rtlpriv-cfg-ops-fill_tx_desc(hw, hdr, (u8 *) pdesc,
(u8 *)pbuffer_desc, info, NULL, pskb,
BEACON_QUEUE, tcb_desc);
-/*delete in kernel start*/
-#endif
-/*delete in kernel end*/
 
__skb_queue_tail(ring-queue, pskb);
 
@@ -1616,26 +1556,11 @@ int rtl_pci_reset_trx_ring(struct ieee80211_hw *hw)
return 0;
 }
 
-/*delete in kernel start*/
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(3,7,0))
-static bool rtl_pci_tx_chk_waitq_insert(struct ieee80211_hw *hw,
-   struct sk_buff *skb)
-#else
-/*delete in kernel end*/
 static bool rtl_pci_tx_chk_waitq_insert(struct ieee80211_hw *hw,
struct ieee80211_sta *sta,
struct sk_buff *skb)
-/*delete in kernel start*/
-#endif
-/*delete in kernel end*/
 {
struct rtl_priv *rtlpriv = rtl_priv

[PATCH 03/16] Staging: rtl8821ae: Remove version specific code from compat.h

2014-02-17 Thread Sachin Kamat
The code should be for the current kernel version. Remove
conditional version based code.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8821ae/compat.h |   56 
 1 file changed, 56 deletions(-)

diff --git a/drivers/staging/rtl8821ae/compat.h 
b/drivers/staging/rtl8821ae/compat.h
index 68269cc2d477..d1076fdc0489 100644
--- a/drivers/staging/rtl8821ae/compat.h
+++ b/drivers/staging/rtl8821ae/compat.h
@@ -1,65 +1,9 @@
 #ifndef __RTL_COMPAT_H__
 #define __RTL_COMPAT_H__
 
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(2,6,29))
-/*
- * Use this if you want to use the same suspend and resume callbacks for 
suspend
- * to RAM and hibernation.
- */
-#define SIMPLE_DEV_PM_OPS(name, suspend_fn, resume_fn) \
-struct dev_pm_ops name = { \
-   .suspend = suspend_fn, \
-   .resume = resume_fn, \
-   .freeze = suspend_fn, \
-   .thaw = resume_fn, \
-   .poweroff = suspend_fn, \
-   .restore = resume_fn, \
-}
-
-#define compat_pci_suspend(fn) \
-   int fn##_compat(struct pci_dev *pdev, pm_message_t state)   \
-   {   \
-   int r;  \
-   \
-   r = fn(pdev-dev); \
-   if (r)  \
-   return r;   \
-   \
-   pci_save_state(pdev);   \
-   pci_disable_device(pdev);   \
-   pci_set_power_state(pdev, PCI_D3hot);   \
-   \
-   return 0;   \
-   }
-
-#define compat_pci_resume(fn)  \
-   int fn##_compat(struct pci_dev *pdev)   \
-   {   \
-   int r;  \
-   \
-   pci_set_power_state(pdev, PCI_D0);  \
-   r = pci_enable_device(pdev);\
-   if (r)  \
-   return r;   \
-   pci_restore_state(pdev);\
-   \
-   return fn(pdev-dev);  \
-   }
-#endif
-
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(2,6,39))
-#define RX_FLAG_MACTIME_MPDU RX_FLAG_TSFT
-#else
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(3,8,0))
 #define RX_FLAG_MACTIME_MPDU RX_FLAG_MACTIME_START
-#else
-#endif
-//#define NETDEV_TX_OK
-#endif
 
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(3,7,0))
 #define IEEE80211_KEY_FLAG_SW_MGMT IEEE80211_KEY_FLAG_SW_MGMT_TX
-#endif
 
 struct ieee80211_mgmt_compat {
__le16 frame_control;
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 04/16] Staging: rtl8821ae: Remove version specific code from core.c

2014-02-17 Thread Sachin Kamat
The code should be for the current kernel version. Remove
conditional version based code.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8821ae/core.c |  158 +-
 1 file changed, 3 insertions(+), 155 deletions(-)

diff --git a/drivers/staging/rtl8821ae/core.c b/drivers/staging/rtl8821ae/core.c
index 40de6089039e..1d407db71af3 100644
--- a/drivers/staging/rtl8821ae/core.c
+++ b/drivers/staging/rtl8821ae/core.c
@@ -88,42 +88,9 @@ static void rtl_op_stop(struct ieee80211_hw *hw)
mutex_unlock(rtlpriv-locks.conf_mutex);
 }
 
-/*delete in kernel start*/
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(2,6,39))
-static int rtl_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
-{
-   struct rtl_priv *rtlpriv = rtl_priv(hw);
-   struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
-   struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
-   struct rtl_tcb_desc tcb_desc;
-   memset(tcb_desc, 0, sizeof(struct rtl_tcb_desc));
-
-   if (unlikely(is_hal_stop(rtlhal) || ppsc-rfpwr_state != ERFON))
-   goto err_free;
-
-   if (!test_bit(RTL_STATUS_INTERFACE_START, rtlpriv-status))
-   goto err_free;
-
-   if (!rtlpriv-intf_ops-waitq_insert(hw, skb))
-   rtlpriv-intf_ops-adapter_tx(hw, skb, tcb_desc);
-
-   return NETDEV_TX_OK;
-
-err_free:
-   dev_kfree_skb_any(skb);
-   return NETDEV_TX_OK;
-}
-#else
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(3,7,0))
-static void rtl_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
-#else
-/*delete in kernel end*/
 static void rtl_op_tx(struct ieee80211_hw *hw,
  struct ieee80211_tx_control *control,
  struct sk_buff *skb)
-/*delete in kernel start*/
-#endif
-/*delete in kernel end*/
 {
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
@@ -137,26 +104,14 @@ static void rtl_op_tx(struct ieee80211_hw *hw,
if (!test_bit(RTL_STATUS_INTERFACE_START, rtlpriv-status))
goto err_free;
 
-/*delete in kernel start*/
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(3,7,0))
-   if (!rtlpriv-intf_ops-waitq_insert(hw, skb))
-   rtlpriv-intf_ops-adapter_tx(hw, skb, tcb_desc);
-#else
-/*delete in kernel end*/
if (!rtlpriv-intf_ops-waitq_insert(hw, control-sta, skb))
rtlpriv-intf_ops-adapter_tx(hw, control-sta, skb, tcb_desc);
-/*delete in kernel start*/
-#endif
-/*delete in kernel end*/
return;
 
 err_free:
dev_kfree_skb_any(skb);
return;
 }
-/*delete in kernel start*/
-#endif
-/*delete in kernel end*/
 
 static int rtl_op_add_interface(struct ieee80211_hw *hw,
struct ieee80211_vif *vif)
@@ -171,26 +126,15 @@ static int rtl_op_add_interface(struct ieee80211_hw *hw,
return -EOPNOTSUPP;
}
 
-/*This flag is not defined before kernel 3.4*/
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(3,4,0))
vif-driver_flags |= IEEE80211_VIF_BEACON_FILTER;
-#endif
 
rtl_ips_nic_on(hw);
 
mutex_lock(rtlpriv-locks.conf_mutex);
-/*delete in kernel start*/
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(2,6,37))
switch (ieee80211_vif_type_p2p(vif)) {
case NL80211_IFTYPE_P2P_CLIENT:
mac-p2p = P2P_ROLE_CLIENT;
/*fall through*/
-#else
-/*delete in kernel end*/
-   switch (vif-type) {
-/*delete in kernel start*/
-#endif
-/*delete in kernel end*/
case NL80211_IFTYPE_STATION:
if (mac-beacon_enabled == 1) {
RT_TRACE(COMP_MAC80211, DBG_LOUD,
@@ -214,16 +158,12 @@ static int rtl_op_add_interface(struct ieee80211_hw *hw,
(u8 *) (mac-basic_rates));
 
break;
-/*delete in kernel start*/
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(2,6,37))
case NL80211_IFTYPE_P2P_GO:
mac-p2p = P2P_ROLE_GO;
/*fall through*/
-#endif
-/*delete in kernel end*/
case NL80211_IFTYPE_AP:
RT_TRACE(COMP_MAC80211, DBG_LOUD,
-(NL80211_IFTYPE_AP \n));
+   (NL80211_IFTYPE_AP\n));
 
mac-link_state = MAC80211_LINKED;
rtlpriv-cfg-ops-set_bcn_reg(hw);
@@ -310,9 +250,7 @@ static void rtl_op_remove_interface(struct ieee80211_hw *hw,
 
mutex_unlock(rtlpriv-locks.conf_mutex);
 }
-/*delete in kernel start*/
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(2,6,37))
-/*delete in kernel end*/
+
 static int rtl_op_change_interface(struct ieee80211_hw *hw,
   struct ieee80211_vif *vif,
   enum nl80211_iftype new_type, bool p2p)
@@ -328,9 +266,7 @@ static int rtl_op_change_interface(struct ieee80211_hw *hw,
 ( p2p  %x\n,p2p));
return ret;
 }
-/*delete in kernel start*/
-#endif
-/*delete in kernel end*/
+
 static int rtl_op_config(struct ieee80211_hw *hw

[PATCH 01/16] Staging: rtl8821ae: Remove version specific code from base.c

2014-02-17 Thread Sachin Kamat
The code should be for the current kernel version. Remove
conditional version based code.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
Series is compile tested against latest linux-next (20140217).
---
 drivers/staging/rtl8821ae/base.c |   45 --
 1 file changed, 45 deletions(-)

diff --git a/drivers/staging/rtl8821ae/base.c b/drivers/staging/rtl8821ae/base.c
index da04f034e114..45bb2bf20c3a 100644
--- a/drivers/staging/rtl8821ae/base.c
+++ b/drivers/staging/rtl8821ae/base.c
@@ -320,9 +320,6 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw)
/* 5 set hw caps */
hw-flags = IEEE80211_HW_SIGNAL_DBM |
IEEE80211_HW_RX_INCLUDES_FCS |
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(3, 4, 0))
-   IEEE80211_HW_BEACON_FILTER |
-#endif
IEEE80211_HW_AMPDU_AGGREGATION |
IEEE80211_HW_REPORTS_TX_ACK_STATUS |
IEEE80211_HW_CONNECTION_MONITOR |
@@ -335,8 +332,6 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw)
IEEE80211_HW_PS_NULLFUNC_STACK |
/* IEEE80211_HW_SUPPORTS_DYNAMIC_PS | */
0;
-/*delete in kernel start*/
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(2, 6, 37))
hw-wiphy-interface_modes =
BIT(NL80211_IFTYPE_AP) |
BIT(NL80211_IFTYPE_STATION) |
@@ -344,23 +339,9 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw)
BIT(NL80211_IFTYPE_MESH_POINT) |
BIT(NL80211_IFTYPE_P2P_CLIENT) |
BIT(NL80211_IFTYPE_P2P_GO);
-#else
-/*delete in kernel end*/
-   hw-wiphy-interface_modes =
-   BIT(NL80211_IFTYPE_AP) |
-   BIT(NL80211_IFTYPE_STATION) |
-   BIT(NL80211_IFTYPE_ADHOC) |
-   BIT(NL80211_IFTYPE_MESH_POINT) ;
-/*delete in kernel start*/
-#endif
-/*delete in kernel end*/
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(2, 6, 39))
hw-wiphy-flags |= WIPHY_FLAG_IBSS_RSN;
-#endif
 
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(3, 3, 0))
hw-wiphy-flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;
-#endif
 
hw-wiphy-rts_threshold = 2347;
 
@@ -401,15 +382,7 @@ static void _rtl_init_deferred_work(struct ieee80211_hw 
*hw)
rtl_easy_concurrent_retrytimer_callback, (unsigned long)hw);
/* 2 work queue */
rtlpriv-works.hw = hw;
-/*delete in kernel start*/
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(2, 6, 37))
-/*delete in kernel end*/
rtlpriv-works.rtl_wq = alloc_workqueue(rtlpriv-cfg-name, 0, 0);
-/*delete in kernel start*/
-#else
-   rtlpriv-works.rtl_wq = create_workqueue(rtlpriv-cfg-name);
-#endif
-/*delete in kernel end*/
INIT_DELAYED_WORK(rtlpriv-works.watchdog_wq,
  (void *)rtl_watchdog_wq_callback);
INIT_DELAYED_WORK(rtlpriv-works.ips_nic_off_wq,
@@ -897,13 +870,8 @@ bool rtl_action_proc(struct ieee80211_hw *hw, struct 
sk_buff *skb, u8 is_tx)
hdr-addr3,
tid);
if (skb_delba) {
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(3, 10, 0))
rx_status.freq = 
hw-conf.chandef.chan-center_freq;
rx_status.band = 
hw-conf.chandef.chan-band;
-#else
-   rx_status.freq = 
hw-conf.channel-center_freq;
-   rx_status.band = 
hw-conf.channel-band;
-#endif
rx_status.flag |= 
RX_FLAG_DECRYPTED;
rx_status.flag |= 
RX_FLAG_MACTIME_MPDU;
rx_status.rate_idx = 0;
@@ -1478,21 +1446,8 @@ int rtl_send_smps_action(struct ieee80211_hw *hw,
/* rtlpriv-cfg-ops-update_rate_tbl(hw, sta, 0); */
 
info-control.rates[0].idx = 0;
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(3, 10, 0))
info-band = hw-conf.chandef.chan-band;
-#else
-   info-band = hw-conf.channel-band;
-#endif
-/*delete in kernel start*/
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(3, 7, 0))
-   info-control.sta = sta;
-   rtlpriv-intf_ops-adapter_tx(hw, skb, tcb_desc);
-#else
-/*delete in kernel end*/
rtlpriv-intf_ops-adapter_tx(hw, sta, skb, tcb_desc);
-/*delete in kernel start*/
-#endif
-/*delete in kernel end*/
}
return 1;
 
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 10/16] Staging: rtl8821ae: Remove version specific code from rc.c

2014-02-17 Thread Sachin Kamat
The code should be for the current kernel version. Remove
conditional version based code.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8821ae/rc.c |   18 --
 1 file changed, 18 deletions(-)

diff --git a/drivers/staging/rtl8821ae/rc.c b/drivers/staging/rtl8821ae/rc.c
index 0cc32c60ddee..80d6b9601b2a 100644
--- a/drivers/staging/rtl8821ae/rc.c
+++ b/drivers/staging/rtl8821ae/rc.c
@@ -210,16 +210,8 @@ static void rtl_tx_status(void *ppriv,
   tid)) {
sta_entry-tids[tid].agg.agg_state =
RTL_AGG_PROGRESS;
-   /*delete in kernel start*/
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(2,6,38))
-   /*delete in kernel end*/
ieee80211_start_tx_ba_session(sta, tid,
  5000);
-   /*delete in kernel start*/
-#else
-   ieee80211_start_tx_ba_session(sta, tid);
-#endif
-   /*delete in kernel end*/
}
}
}
@@ -232,15 +224,6 @@ static void rtl_rate_init(void *ppriv,
  struct ieee80211_sta *sta, void *priv_sta)
 {
 }
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(3,5,0))
-static void rtl_rate_update(void *ppriv,
-   struct ieee80211_supported_band *sband,
-   struct ieee80211_sta *sta, void *priv_sta,
-   u32 changed,
-   enum nl80211_channel_type oper_chan_type)
-{
-}
-#else
 static void rtl_rate_update(void *ppriv,
struct ieee80211_supported_band *sband,
struct cfg80211_chan_def *chandef,
@@ -248,7 +231,6 @@ static void rtl_rate_update(void *ppriv,
u32 changed)
 {
 }
-#endif
 static void *rtl_rate_alloc(struct ieee80211_hw *hw, struct dentry *debugfsdir)
 {
struct rtl_priv *rtlpriv = rtl_priv(hw);
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 14/16] Staging: rtl8821ae: Remove version specific code from trx.c

2014-02-17 Thread Sachin Kamat
The code should be for the current kernel version. Remove
conditional version based code.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8821ae/rtl8821ae/trx.c |   45 -
 1 file changed, 45 deletions(-)

diff --git a/drivers/staging/rtl8821ae/rtl8821ae/trx.c 
b/drivers/staging/rtl8821ae/rtl8821ae/trx.c
index f82ed5143b3e..7a2f3a884607 100644
--- a/drivers/staging/rtl8821ae/rtl8821ae/trx.c
+++ b/drivers/staging/rtl8821ae/rtl8821ae/trx.c
@@ -77,11 +77,7 @@ static int _rtl8821ae_rate_mapping(struct ieee80211_hw *hw,
int rate_idx;
 
if (false == isht) {
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(3,10,0))
if (IEEE80211_BAND_2GHZ == hw-conf.chandef.chan-band) {
-#else
-   if (IEEE80211_BAND_2GHZ == hw-conf.channel-band) {
-#endif
switch (desc_rate) {
case DESC_RATE1M:
rate_idx = 0;
@@ -579,13 +575,8 @@ bool rtl8821ae_rx_query_desc(struct ieee80211_hw *hw,
if (status-wake_match)
RT_TRACE(COMP_RXDESC,DBG_LOUD,
(Get Wakeup Packet!! 
WakeMatch=%d\n,status-wake_match ));
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(3,10,0))
rx_status-freq = hw-conf.chandef.chan-center_freq;
rx_status-band = hw-conf.chandef.chan-band;
-#else
-   rx_status-freq = hw-conf.channel-center_freq;
-   rx_status-band = hw-conf.channel-band;
-#endif
 
hdr = (struct ieee80211_hdr *)(skb-data + status-rx_drvinfo_size
+ status-rx_bufshift);
@@ -650,33 +641,17 @@ bool rtl8821ae_rx_query_desc(struct ieee80211_hw *hw,
return true;
 }
 
-/*delete in kernel start*/
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(3,7,0))
-void rtl8821ae_tx_fill_desc(struct ieee80211_hw *hw,
- struct ieee80211_hdr *hdr, u8 *pdesc_tx, u8 *txbd,
- struct ieee80211_tx_info *info, struct sk_buff *skb,
- u8 hw_queue, struct rtl_tcb_desc *ptcb_desc)
-#else
-/*delete in kernel end*/
 void rtl8821ae_tx_fill_desc(struct ieee80211_hw *hw,
  struct ieee80211_hdr *hdr, u8 *pdesc_tx, u8 *txbd,
  struct ieee80211_tx_info *info,
  struct ieee80211_sta *sta,
  struct sk_buff *skb,
  u8 hw_queue, struct rtl_tcb_desc *ptcb_desc)
-/*delete in kernel start*/
-#endif
-/*delete in kernel end*/
 {
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
struct rtl_hal *rtlhal = rtl_hal(rtlpriv);
-/*delete in kernel start*/
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(3,7,0))
-   struct ieee80211_sta *sta = info-control.sta;
-#endif
-/*delete in kernel end*/
u8 *pdesc = (u8 *) pdesc_tx;
u16 seq_number;
u16 fc = le16_to_cpu(hdr-frame_control);
@@ -783,9 +758,6 @@ void rtl8821ae_tx_fill_desc(struct ieee80211_hw *hw,
}
if (info-control.hw_key) {
struct ieee80211_key_conf *keyconf = 
info-control.hw_key;
-/*delete in kernel start*/
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(2,6,37))
-/*delete in kernel end*/
switch (keyconf-cipher) {
case WLAN_CIPHER_SUITE_WEP40:
case WLAN_CIPHER_SUITE_WEP104:
@@ -800,23 +772,6 @@ void rtl8821ae_tx_fill_desc(struct ieee80211_hw *hw,
break;
 
}
-/*delete in kernel start*/
-#else
-   switch (keyconf-alg) {
-   case ALG_WEP:
-   case ALG_TKIP:
-   SET_TX_DESC_SEC_TYPE(pdesc, 0x1);
-   break;
-   case ALG_CCMP:
-   SET_TX_DESC_SEC_TYPE(pdesc, 0x3);
-   break;
-   default:
-   SET_TX_DESC_SEC_TYPE(pdesc, 0x0);
-   break;
-
-   }
-#endif
-/*delete in kernel end*/
}
 
SET_TX_DESC_QUEUE_SEL(pdesc, fw_qsel);
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 05/16] Staging: rtl8821ae: Remove version specific code from debug.c

2014-02-17 Thread Sachin Kamat
The code should be for the current kernel version. Remove
conditional version based code.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8821ae/debug.c |7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8821ae/debug.c 
b/drivers/staging/rtl8821ae/debug.c
index cb051223c684..b8009a9ac56c 100644
--- a/drivers/staging/rtl8821ae/debug.c
+++ b/drivers/staging/rtl8821ae/debug.c
@@ -30,12 +30,7 @@
 #include wifi.h
 #include cam.h
 
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(3,10,0))
 #define GET_INODE_DATA(__node) PDE_DATA(__node)
-#else
-#define GET_INODE_DATA(__node) PDE(__node)-data
-#endif
-
 
 void rtl_dbgp_flag_init(struct ieee80211_hw *hw)
 {
@@ -985,4 +980,4 @@ void rtl_proc_remove_topdir(void)
 {
if (proc_topdir)
remove_proc_entry(rtlwifi, init_net.proc_net);
-}
\ No newline at end of file
+}
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 13/16] Staging: rtl8821ae: Remove version specific code from sw.c

2014-02-17 Thread Sachin Kamat
The code should be for the current kernel version. Remove
conditional version based code.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8821ae/rtl8821ae/sw.c |   21 -
 1 file changed, 21 deletions(-)

diff --git a/drivers/staging/rtl8821ae/rtl8821ae/sw.c 
b/drivers/staging/rtl8821ae/rtl8821ae/sw.c
index 85a3474fc099..b828714ed762 100644
--- a/drivers/staging/rtl8821ae/rtl8821ae/sw.c
+++ b/drivers/staging/rtl8821ae/rtl8821ae/sw.c
@@ -415,19 +415,11 @@ struct rtl_hal_cfg rtl8821ae_hal_cfg = {
.maps[RTL_RC_HT_RATEMCS15] =  DESC_RATEMCS15,
 };
 
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(3,8,0))
 static struct pci_device_id rtl8821ae_pci_ids[] = {
 {RTL_PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8812, rtl8821ae_hal_cfg)},
 {RTL_PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8821, rtl8821ae_hal_cfg)},
 {},
 };
-#else
-static struct pci_device_id rtl8821ae_pci_ids[] __devinitdata = {
-   {RTL_PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8812, rtl8821ae_hal_cfg)},
-   {RTL_PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8821, rtl8821ae_hal_cfg)},
-   {},
-};
-#endif
 
 MODULE_DEVICE_TABLE(pci, rtl8821ae_pci_ids);
 
@@ -445,14 +437,7 @@ MODULE_PARM_DESC(swenc, using hardware crypto (default 0 
[hardware])\n);
 MODULE_PARM_DESC(ips, using no link power save (default 1 is open)\n);
 MODULE_PARM_DESC(fwlps, using linked fw control power save (default 1 is 
open)\n);
 
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(2,6,29))
 static const SIMPLE_DEV_PM_OPS(rtlwifi_pm_ops, rtl_pci_suspend, 
rtl_pci_resume);
-#endif
-
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(2,6,29))
-compat_pci_suspend(rtl_pci_suspend)
-compat_pci_resume(rtl_pci_resume)
-#endif
 
 static struct pci_driver rtl8821ae_driver = {
.name = KBUILD_MODNAME,
@@ -460,13 +445,7 @@ static struct pci_driver rtl8821ae_driver = {
.probe = rtl_pci_probe,
.remove = rtl_pci_disconnect,
 
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(2,6,29))
.driver.pm = rtlwifi_pm_ops,
-#elif defined(CONFIG_PM)
-   .suspend = rtl_pci_suspend_compat,
-   .resume = rtl_pci_resume_compat,
-#endif
-
 };
 
 
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 08/16] Staging: rtl8821ae: Remove version specific code from pci.h

2014-02-17 Thread Sachin Kamat
The code should be for the current kernel version. Remove
conditional version based code.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8821ae/pci.h |5 -
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/rtl8821ae/pci.h b/drivers/staging/rtl8821ae/pci.h
index 9f206550a657..6a6a3ce7357c 100644
--- a/drivers/staging/rtl8821ae/pci.h
+++ b/drivers/staging/rtl8821ae/pci.h
@@ -282,13 +282,8 @@ int rtl_pci_reset_trx_ring(struct ieee80211_hw *hw);
 
 extern struct rtl_intf_ops rtl_pci_ops;
 
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(3,8,0))
 int rtl_pci_probe(struct pci_dev *pdev,
   const struct pci_device_id *id);
-#else
-int __devinit rtl_pci_probe(struct pci_dev *pdev,
-   const struct pci_device_id *id);
-#endif
 void rtl_pci_disconnect(struct pci_dev *pdev);
 int rtl_pci_suspend(struct device *dev);
 int rtl_pci_resume(struct device *dev);
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 12/16] Staging: rtl8821ae: Remove version specific code from regd.h

2014-02-17 Thread Sachin Kamat
The code should be for the current kernel version. Remove
conditional version based code.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8821ae/regd.h |7 ---
 1 file changed, 7 deletions(-)

diff --git a/drivers/staging/rtl8821ae/regd.h b/drivers/staging/rtl8821ae/regd.h
index dceb3f18200b..535f22aa7ea0 100644
--- a/drivers/staging/rtl8821ae/regd.h
+++ b/drivers/staging/rtl8821ae/regd.h
@@ -60,16 +60,9 @@ enum country_code_type_t {
COUNTRY_CODE_MAX
 };
 
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(3,9,0))
 int rtl_regd_init(struct ieee80211_hw *hw,
  void (*reg_notifier) (struct wiphy *wiphy,
struct regulatory_request *request));
 void rtl_reg_notifier(struct wiphy *wiphy, struct regulatory_request *request);
-#else
-int rtl_regd_init(struct ieee80211_hw *hw,
- int (*reg_notifier) (struct wiphy *wiphy,
-  struct regulatory_request *request));
-int rtl_reg_notifier(struct wiphy *wiphy, struct regulatory_request *request);
-#endif
 
 #endif
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 15/16] Staging: rtl8821ae: Remove version specific code from trx.h

2014-02-17 Thread Sachin Kamat
The code should be for the current kernel version. Remove
conditional version based code.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8821ae/rtl8821ae/trx.h |   11 ---
 1 file changed, 11 deletions(-)

diff --git a/drivers/staging/rtl8821ae/rtl8821ae/trx.h 
b/drivers/staging/rtl8821ae/rtl8821ae/trx.h
index da93e5c7ece7..af017844d82f 100644
--- a/drivers/staging/rtl8821ae/rtl8821ae/trx.h
+++ b/drivers/staging/rtl8821ae/rtl8821ae/trx.h
@@ -609,23 +609,12 @@ struct rx_desc_8821ae {
 
 } __packed;
 
-/*delete in kernel start*/
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(3,7,0))
-void rtl8821ae_tx_fill_desc(struct ieee80211_hw *hw,
- struct ieee80211_hdr *hdr, u8 *pdesc_tx, u8 *txbd,
- struct ieee80211_tx_info *info, struct sk_buff *skb,
- u8 hw_queue, struct rtl_tcb_desc *ptcb_desc);
-#else
-/*delete in kernel end*/
 void rtl8821ae_tx_fill_desc(struct ieee80211_hw *hw,
  struct ieee80211_hdr *hdr, u8 *pdesc_tx, u8 *txbd,
  struct ieee80211_tx_info *info,
  struct ieee80211_sta *sta,
  struct sk_buff *skb,
  u8 hw_queue, struct rtl_tcb_desc *ptcb_desc);
-/*delete in kernel start*/
-#endif
-/*delete in kernel end*/
 bool rtl8821ae_rx_query_desc(struct ieee80211_hw *hw,
   struct rtl_stats *status,
   struct ieee80211_rx_status *rx_status,
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 01/16] Staging: rtl8821ae: Remove version specific code from base.c

2014-02-17 Thread Sachin Kamat
On 17 February 2014 18:04, Dan Carpenter dan.carpen...@oracle.com wrote:
 On Mon, Feb 17, 2014 at 05:21:56PM +0530, Sachin Kamat wrote:
 The code should be for the current kernel version. Remove
 conditional version based code.

 Signed-off-by: Sachin Kamat sachin.ka...@linaro.org

 We're going to delete this whole driver in a couple weeks so I don't
 want to review this series.  The driver will be replaced with a from
 scratch driver.

 Oh OK. I wasn't aware of this plan. Thanks for the information.

-- 
With warm regards,
Sachin
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/1] staging: imx-drm: remove unused variable

2014-02-12 Thread Sachin Kamat
Silences the following warning:
drivers/staging/imx-drm/imx-drm-core.c: In function ‘imx_drm_driver_unload’:
drivers/staging/imx-drm/imx-drm-core.c:87:25: warning: unused variable ‘imxdrm’ 
[-Wunused-variable]

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Cc: Sascha Hauer s.ha...@pengutronix.de
---
 drivers/staging/imx-drm/imx-drm-core.c |2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/imx-drm/imx-drm-core.c 
b/drivers/staging/imx-drm/imx-drm-core.c
index 236ed66..573fe88 100644
--- a/drivers/staging/imx-drm/imx-drm-core.c
+++ b/drivers/staging/imx-drm/imx-drm-core.c
@@ -84,8 +84,6 @@ static void imx_drm_driver_lastclose(struct drm_device *drm)
 
 static int imx_drm_driver_unload(struct drm_device *drm)
 {
-   struct imx_drm_device *imxdrm = drm-dev_private;
-
imx_drm_device_put();
 
drm_vblank_cleanup(drm);
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/2] staging: rtl8821ae: Remove duplicate include

2014-02-12 Thread Sachin Kamat
phy.h was included twice.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8821ae/rtl8821ae/trx.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8821ae/rtl8821ae/trx.c 
b/drivers/staging/rtl8821ae/rtl8821ae/trx.c
index 75ae4387fe19..f82ed5143b3e 100644
--- a/drivers/staging/rtl8821ae/rtl8821ae/trx.c
+++ b/drivers/staging/rtl8821ae/rtl8821ae/trx.c
@@ -37,7 +37,7 @@
 #include trx.h
 #include led.h
 #include dm.h
-#include phy.h
+
 u8 _rtl8821ae_map_hwqueue_to_fwqueue(struct sk_buff *skb, u8 hw_queue)
 {
u16 fc = rtl_get_fc(skb);
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/2] staging: lustre: Remove duplicate inclusion of crypto.h

2014-02-12 Thread Sachin Kamat
crypto.h was included twice.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 .../lustre/lustre/ptlrpc/gss/gss_krb5_mech.c   |1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/ptlrpc/gss/gss_krb5_mech.c 
b/drivers/staging/lustre/lustre/ptlrpc/gss/gss_krb5_mech.c
index b9fa3b4a40db..6eda1799be8f 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/gss/gss_krb5_mech.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/gss/gss_krb5_mech.c
@@ -54,7 +54,6 @@
 #include linux/slab.h
 #include linux/crypto.h
 #include linux/mutex.h
-#include linux/crypto.h
 
 #include obd.h
 #include obd_class.h
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/1] staging: imx-drm: Fix build error

2014-01-27 Thread Sachin Kamat
Instead of redefining the enums, use the standard ones already
available to avoid the following build errors:

drivers/staging/imx-drm/imx-hdmi.c:56:13: error: nested redefinition of ‘enum 
hdmi_colorimetry’
drivers/staging/imx-drm/imx-hdmi.c:56:13: error: redeclaration of ‘enum 
hdmi_colorimetry’
In file included from include/drm/drm_crtc.h:33:0,
 from include/drm/drmP.h:710,
 from drivers/staging/imx-drm/imx-hdmi.c:24:
include/linux/hdmi.h:48:6: note: originally defined here

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Cc: Guennadi Liakhovetski g.liakhovet...@gmx.de
Cc: Fabio Estevam fabio.este...@freescale.com
---
Only compile tested.
---
 drivers/staging/imx-drm/imx-hdmi.c |   22 +-
 1 file changed, 9 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/imx-drm/imx-hdmi.c 
b/drivers/staging/imx-drm/imx-hdmi.c
index f3a1f5e2e492..62ce0e86f14b 100644
--- a/drivers/staging/imx-drm/imx-hdmi.c
+++ b/drivers/staging/imx-drm/imx-hdmi.c
@@ -16,6 +16,7 @@
 #include linux/delay.h
 #include linux/err.h
 #include linux/clk.h
+#include linux/hdmi.h
 #include linux/regmap.h
 #include linux/mfd/syscon.h
 #include linux/mfd/syscon/imx6q-iomuxc-gpr.h
@@ -52,11 +53,6 @@ enum hdmi_datamap {
YCbCr422_12B = 0x12,
 };
 
-enum hdmi_colorimetry {
-   ITU601,
-   ITU709,
-};
-
 enum imx_hdmi_devtype {
IMX6Q_HDMI,
IMX6DL_HDMI,
@@ -489,12 +485,12 @@ static void imx_hdmi_update_csc_coeffs(struct imx_hdmi 
*hdmi)
 
if (is_color_space_conversion(hdmi)) {
if (hdmi-hdmi_data.enc_out_format == RGB) {
-   if (hdmi-hdmi_data.colorimetry == ITU601)
+   if (hdmi-hdmi_data.colorimetry == 
HDMI_COLORIMETRY_ITU_601)
csc_coeff = csc_coeff_rgb_out_eitu601;
else
csc_coeff = csc_coeff_rgb_out_eitu709;
} else if (hdmi-hdmi_data.enc_in_format == RGB) {
-   if (hdmi-hdmi_data.colorimetry == ITU601)
+   if (hdmi-hdmi_data.colorimetry == 
HDMI_COLORIMETRY_ITU_601)
csc_coeff = csc_coeff_rgb_in_eitu601;
else
csc_coeff = csc_coeff_rgb_in_eitu709;
@@ -1140,16 +1136,16 @@ static void hdmi_config_AVI(struct imx_hdmi *hdmi)
/* Set up colorimetry */
if (hdmi-hdmi_data.enc_out_format == XVYCC444) {
colorimetry = HDMI_FC_AVICONF1_COLORIMETRY_EXTENDED_INFO;
-   if (hdmi-hdmi_data.colorimetry == ITU601)
+   if (hdmi-hdmi_data.colorimetry == HDMI_COLORIMETRY_ITU_601)
ext_colorimetry =
HDMI_FC_AVICONF2_EXT_COLORIMETRY_XVYCC601;
-   else /* hdmi-hdmi_data.colorimetry == ITU709 */
+   else /*hdmi-hdmi_data.colorimetry == HDMI_COLORIMETRY_ITU_709*/
ext_colorimetry =
HDMI_FC_AVICONF2_EXT_COLORIMETRY_XVYCC709;
} else if (hdmi-hdmi_data.enc_out_format != RGB) {
-   if (hdmi-hdmi_data.colorimetry == ITU601)
+   if (hdmi-hdmi_data.colorimetry == HDMI_COLORIMETRY_ITU_601)
colorimetry = HDMI_FC_AVICONF1_COLORIMETRY_SMPTE;
-   else /* hdmi-hdmi_data.colorimetry == ITU709 */
+   else /*hdmi-hdmi_data.colorimetry == HDMI_COLORIMETRY_ITU_709*/
colorimetry = HDMI_FC_AVICONF1_COLORIMETRY_ITUR;
ext_colorimetry = HDMI_FC_AVICONF2_EXT_COLORIMETRY_XVYCC601;
} else { /* Carries no data */
@@ -1379,9 +1375,9 @@ static int imx_hdmi_setup(struct imx_hdmi *hdmi, struct 
drm_display_mode *mode)
(hdmi-vic == 21) || (hdmi-vic == 22) ||
(hdmi-vic == 2) || (hdmi-vic == 3) ||
(hdmi-vic == 17) || (hdmi-vic == 18))
-   hdmi-hdmi_data.colorimetry = ITU601;
+   hdmi-hdmi_data.colorimetry = HDMI_COLORIMETRY_ITU_601;
else
-   hdmi-hdmi_data.colorimetry = ITU709;
+   hdmi-hdmi_data.colorimetry = HDMI_COLORIMETRY_ITU_709;
 
if ((hdmi-vic == 10) || (hdmi-vic == 11) ||
(hdmi-vic == 12) || (hdmi-vic == 13) ||
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/1] staging: ion: Use PTR_ERR_OR_ZERO

2014-01-26 Thread Sachin Kamat
PTR_RET is deprecated. Use PTR_ERR_OR_ZERO instead.
While at it also use PTR_ERR_OR_ZERO in ion.c to simplify
the code.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Cc: John Stultz john.stu...@linaro.org
---
 drivers/staging/android/ion/ion.c  |5 ++---
 drivers/staging/android/ion/ion_heap.c |2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/android/ion/ion.c 
b/drivers/staging/android/ion/ion.c
index 574066ff73f8..b3395924f03e 100644
--- a/drivers/staging/android/ion/ion.c
+++ b/drivers/staging/android/ion/ion.c
@@ -16,6 +16,7 @@
  */
 
 #include linux/device.h
+#include linux/err.h
 #include linux/file.h
 #include linux/freezer.h
 #include linux/fs.h
@@ -1017,9 +1018,7 @@ static int ion_dma_buf_begin_cpu_access(struct dma_buf 
*dmabuf, size_t start,
mutex_lock(buffer-lock);
vaddr = ion_buffer_kmap_get(buffer);
mutex_unlock(buffer-lock);
-   if (IS_ERR(vaddr))
-   return PTR_ERR(vaddr);
-   return 0;
+   return PTR_ERR_OR_ZERO(vaddr);
 }
 
 static void ion_dma_buf_end_cpu_access(struct dma_buf *dmabuf, size_t start,
diff --git a/drivers/staging/android/ion/ion_heap.c 
b/drivers/staging/android/ion/ion_heap.c
index 296c74f98dc0..03cc43222b50 100644
--- a/drivers/staging/android/ion/ion_heap.c
+++ b/drivers/staging/android/ion/ion_heap.c
@@ -247,7 +247,7 @@ int ion_heap_init_deferred_free(struct ion_heap *heap)
if (IS_ERR(heap-task)) {
pr_err(%s: creating thread for deferred free failed\n,
   __func__);
-   return PTR_RET(heap-task);
+   return PTR_ERR_OR_ZERO(heap-task);
}
return 0;
 }
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/1] staging: dgap: Fix build error

2014-01-09 Thread Sachin Kamat
Include the header file for kzalloc to fix the following build error:
drivers/staging/dgap/dgap_fep5.c: In function ‘dgap_do_config_load’:
drivers/staging/dgap/dgap_fep5.c:78:2: error: implicit declaration of function
‘kzalloc’ [-Werror=implicit-function-declaration]

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Cc: Lidza Louina lidza.lou...@gmail.com
---
 drivers/staging/dgap/dgap_fep5.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/dgap/dgap_fep5.c b/drivers/staging/dgap/dgap_fep5.c
index 15f9a8512313..af37d7a3b4e1 100644
--- a/drivers/staging/dgap/dgap_fep5.c
+++ b/drivers/staging/dgap/dgap_fep5.c
@@ -37,6 +37,7 @@
 #include linux/pci.h
 #include linux/delay.h   /* For udelay */
 #include asm/uaccess.h   /* For copy_from_user/copy_to_user */
+#include linux/slab.h
 #include linux/tty.h
 #include linux/tty_flip.h/* For tty_schedule_flip */
 
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 1/1] staging: dgap: Fix build error

2014-01-09 Thread Sachin Kamat
On Thursday, 9 January 2014, Greg KH wrote:

 On Thu, Jan 09, 2014 at 03:13:10PM +0530, Sachin Kamat wrote:
  Include the header file for kzalloc to fix the following build error:
  drivers/staging/dgap/dgap_fep5.c: In function ‘dgap_do_config_load’:
  drivers/staging/dgap/dgap_fep5.c:78:2: error: implicit declaration of 
  function
  ‘kzalloc’ [-Werror=implicit-function-declaration]

 Please don't line-wrap error messages.

Sorry for the inadvertent mistake.


 Also, what platform shows this error, I don't see it here on x86, and I
 have not gotten any build failure reports from the build system.

I got this while building today's linux-next (20140109) for ARM on x86 machine.

Regards,
Sachin.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 1/1] staging: dgap: Fix build error

2014-01-09 Thread Sachin Kamat
On 10 January 2014 08:36, Sachin Kamat sachin.ka...@linaro.org wrote:
 On Thursday, 9 January 2014, Greg KH wrote:

 On Thu, Jan 09, 2014 at 03:13:10PM +0530, Sachin Kamat wrote:
  Include the header file for kzalloc to fix the following build error:
  drivers/staging/dgap/dgap_fep5.c: In function ‘dgap_do_config_load’:
  drivers/staging/dgap/dgap_fep5.c:78:2: error: implicit declaration of 
  function
  ‘kzalloc’ [-Werror=implicit-function-declaration]

 Please don't line-wrap error messages.

 Sorry for the inadvertent mistake.


 Also, what platform shows this error, I don't see it here on x86, and I
 have not gotten any build failure reports from the build system.

 I got this while building today's linux-next (20140109) for ARM on x86 
 machine.

This issue seems to have been fixed in 20140110 linux-next tree by a
patch from Vincent
(staging: dgap: fix missing header inclusion).
Please drop my patch. Sorry for the noise.

-- 
With warm regards,
Sachin
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 06/10] staging: lustre: Do not use 0 for NULL pointer in console.c

2013-10-09 Thread Sachin Kamat
Do not use 0 for NULL pointer.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/lustre/lnet/selftest/console.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lnet/selftest/console.c 
b/drivers/staging/lustre/lnet/selftest/console.c
index 09e4700..f1152e4 100644
--- a/drivers/staging/lustre/lnet/selftest/console.c
+++ b/drivers/staging/lustre/lnet/selftest/console.c
@@ -797,7 +797,7 @@ lstcon_group_info(char *name, lstcon_ndlist_ent_t *gents_p,
return rc;
}
 
-   if (dents_up != 0) {
+   if (dents_up) {
/* verbose query */
rc = lstcon_nodes_getent(grp-grp_ndl_list,
 index_p, count_p, dents_up);
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 05/10] staging: line6: midi: Use NULL instead of 0 for pointers

2013-10-09 Thread Sachin Kamat
Use NULL instead of 0 for pointers.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/line6/midi.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/line6/midi.c b/drivers/staging/line6/midi.c
index e3f9a53..52da4d9 100644
--- a/drivers/staging/line6/midi.c
+++ b/drivers/staging/line6/midi.c
@@ -205,7 +205,7 @@ static void line6_midi_input_trigger(struct 
snd_rawmidi_substream *substream,
if (up)
line6-line6midi-substream_receive = substream;
else
-   line6-line6midi-substream_receive = 0;
+   line6-line6midi-substream_receive = NULL;
 }
 
 static struct snd_rawmidi_ops line6_midi_output_ops = {
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 09/10] staging: rtl8192u: Use NULL instead of 0

2013-10-09 Thread Sachin Kamat
Use NULL instead of 0 for pointer.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8192u/r8192U_core.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192u/r8192U_core.c 
b/drivers/staging/rtl8192u/r8192U_core.c
index cd0946d..c383e64 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -2009,7 +2009,7 @@ void rtl8192_usb_deleteendpoints(struct net_device *dev)
priv-oldaddr = NULL;
if (priv-pp_rxskb) {
kfree(priv-pp_rxskb);
-   priv-pp_rxskb = 0;
+   priv-pp_rxskb = NULL;
}
 }
 #else
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 01/10] staging: dgap: dgap_fep5: Remove braces around single line statements

2013-10-09 Thread Sachin Kamat
Single line statements do not require braces.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Cc: Lidza Louina lidza.lou...@gmail.com
---
 drivers/staging/dgap/dgap_fep5.c |   15 +--
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/dgap/dgap_fep5.c b/drivers/staging/dgap/dgap_fep5.c
index 4464f02..5ebfcac 100644
--- a/drivers/staging/dgap/dgap_fep5.c
+++ b/drivers/staging/dgap/dgap_fep5.c
@@ -1229,29 +1229,24 @@ int dgap_param(struct tty_struct *tty)
uchar   mval;
uchar   hflow;
 
-   if (!tty || tty-magic != TTY_MAGIC) {
+   if (!tty || tty-magic != TTY_MAGIC)
return (-ENXIO);
-   }
 
un = (struct un_t *) tty-driver_data;
-   if (!un || un-magic != DGAP_UNIT_MAGIC) {
+   if (!un || un-magic != DGAP_UNIT_MAGIC)
return (-ENXIO);
-   }
 
ch = un-un_ch;
-   if (!ch || ch-magic != DGAP_CHANNEL_MAGIC) {
+   if (!ch || ch-magic != DGAP_CHANNEL_MAGIC)
return (-ENXIO);
-   }
 
bd = ch-ch_bd;
-   if (!bd || bd-magic != DGAP_BOARD_MAGIC) {
+   if (!bd || bd-magic != DGAP_BOARD_MAGIC)
return (-ENXIO);
-   }
 
 bs = ch-ch_bs;
-   if (bs == 0) {
+   if (bs == 0)
return (-ENXIO);
-   }
 
DPR_PARAM((param start: tdev: %x cflags: %x oflags: %x iflags: %x\n,
ch-ch_tun.un_dev, ch-ch_c_cflag, ch-ch_c_oflag, 
ch-ch_c_iflag));
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/1] staging: xillybus: Use module_platform_driver

2013-10-09 Thread Sachin Kamat
module_platform_driver simplifies the code by removing the boilerplate.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/xillybus/xillybus_of.c |   13 +
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/staging/xillybus/xillybus_of.c 
b/drivers/staging/xillybus/xillybus_of.c
index 92c2931..2ae045e 100644
--- a/drivers/staging/xillybus/xillybus_of.c
+++ b/drivers/staging/xillybus/xillybus_of.c
@@ -198,15 +198,4 @@ static struct platform_driver xillybus_platform_driver = {
},
 };
 
-static int __init xillybus_of_init(void)
-{
-   return platform_driver_register(xillybus_platform_driver);
-}
-
-static void __exit xillybus_of_exit(void)
-{
-   platform_driver_unregister(xillybus_platform_driver);
-}
-
-module_init(xillybus_of_init);
-module_exit(xillybus_of_exit);
+module_platform_driver(xillybus_platform_driver);
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 01/11] staging: cxt1e1: musycc.c: Use NULL instead of 0

2013-09-30 Thread Sachin Kamat
On 1 October 2013 07:18, Greg KH gre...@linuxfoundation.org wrote:
 On Fri, Sep 27, 2013 at 09:36:28AM +0530, Sachin Kamat wrote:
 Pointers should be assigned NULL instead of 0.

 Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
 ---
 Most of the patches in this series will give checkpatch errors related
 to spacing and indentation. This is because the driver does not follow
 the spacing/indentation guidelines provided for the kernel. Fixing the
 whitespace issues for this driver should be taken up as a separate
 exercise, IMHO.

 That is the exact correct thing to do, thanks for doing it in this
 manner, nice job.

Thanks Greg.

-- 
With warm regards,
Sachin
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/1] staging: dgnc: Remove KERNEL_VERSION check

2013-09-27 Thread Sachin Kamat
This check is not required.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Cc: Lidza Louina lidza.lou...@gmail.com
---
 drivers/staging/dgnc/dgnc_kcompat.h |5 -
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_kcompat.h 
b/drivers/staging/dgnc/dgnc_kcompat.h
index ed85152..eaec7e6 100644
--- a/drivers/staging/dgnc/dgnc_kcompat.h
+++ b/drivers/staging/dgnc/dgnc_kcompat.h
@@ -28,11 +28,6 @@
 #ifndef __DGNC_KCOMPAT_H
 #define __DGNC_KCOMPAT_H
 
-# ifndef KERNEL_VERSION
-#  define KERNEL_VERSION(a,b,c)  (((a)  16) + ((b)  8) + (c))
-# endif
-
-
 #if !defined(TTY_FLIPBUF_SIZE)
 # define TTY_FLIPBUF_SIZE 512
 #endif
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 06/11] staging: cxt1e1: hwprobe.c: Use NULL instead of 0

2013-09-26 Thread Sachin Kamat
Pointers should be assigned NULL instead of 0.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/cxt1e1/hwprobe.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/cxt1e1/hwprobe.c b/drivers/staging/cxt1e1/hwprobe.c
index 53e9237..2f4f051 100644
--- a/drivers/staging/cxt1e1/hwprobe.c
+++ b/drivers/staging/cxt1e1/hwprobe.c
@@ -157,7 +157,7 @@ prep_hdw_info (void)
 hi-pci_slot = 0xff;
 hi-pci_pin[0] = 0;
 hi-pci_pin[1] = 0;
-hi-ndev = 0;
+hi-ndev = NULL;
 hi-addr[0] = 0L;
 hi-addr[1] = 0L;
 hi-addr_mapped[0] = 0L;
@@ -328,7 +328,7 @@ c4hw_attach_all (void)
 break;
 for (j = 0; j  2; j++)
 {
-if (request_mem_region (hi-addr[j], hi-len[j], hi-devname) == 0)
+   if (!request_mem_region (hi-addr[j], hi-len[j], hi-devname))
 {
 pr_warning(%s: memory in use, addr=0x%lx, len=0x%lx ?\n,
hi-devname, hi-addr[j], hi-len[j]);
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 01/11] staging: cxt1e1: musycc.c: Use NULL instead of 0

2013-09-26 Thread Sachin Kamat
Pointers should be assigned NULL instead of 0.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
Most of the patches in this series will give checkpatch errors related
to spacing and indentation. This is because the driver does not follow
the spacing/indentation guidelines provided for the kernel. Fixing the
whitespace issues for this driver should be taken up as a separate
exercise, IMHO.
---

 drivers/staging/cxt1e1/musycc.c |   28 ++--
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/cxt1e1/musycc.c b/drivers/staging/cxt1e1/musycc.c
index 52b6d7f..a2a2af1 100644
--- a/drivers/staging/cxt1e1/musycc.c
+++ b/drivers/staging/cxt1e1/musycc.c
@@ -745,7 +745,7 @@ musycc_init(ci_t *ci)
 #define INT_QUEUE_BOUNDARY  4
 
 regaddr = OS_kmalloc((INT_QUEUE_SIZE + 1) * sizeof(u_int32_t));
-if (regaddr == 0)
+if (!regaddr)
return ENOMEM;
 ci-iqd_p_saved = regaddr;  /* save orig value for free's usage */
 ci-iqd_p = (u_int32_t *) ((unsigned long) (regaddr + INT_QUEUE_BOUNDARY - 
1) 
@@ -766,11 +766,11 @@ musycc_init(ci_t *ci)
 #define GROUP_BOUNDARY   0x800
 
regaddr = OS_kmalloc(sizeof(struct musycc_groupr) + GROUP_BOUNDARY);
-   if (regaddr == 0) {
+   if (!regaddr) {
for (gchan = 0; gchan  i; gchan++) {
pi = ci-port[gchan];
OS_kfree(pi-reg);
-   pi-reg = 0;
+   pi-reg = NULL;
}
return ENOMEM;
}
@@ -839,12 +839,12 @@ musycc_bh_tx_eom(mpi_t *pi, int gchan)
 volatile u_int32_t status;
 
 ch = pi-chan[gchan];
-if (ch == 0 || ch-state != UP) {
+if (!ch || ch-state != UP) {
if (cxt1e1_log_level = LOG_ERROR)
pr_info(%s: intr: xmit EOM on uninitialized channel %d\n,
pi-up-devname, gchan);
 }
-if (ch == 0 || ch-mdt == 0)
+if (!ch || !ch-mdt)
return; /* note: mdt==0 implies a malloc()
 * failure w/in chan_up() routine */
 
@@ -907,7 +907,7 @@ musycc_bh_tx_eom(mpi_t *pi, int gchan)
ch-txd_irq_srv = md-snext;
 
md-data = 0;
-   if (md-mem_token != 0) {
+   if (md-mem_token)  {
/* upcount channel */
atomic_sub(OS_mem_token_tlen(md-mem_token), ch-tx_pending);
/* upcount card */
@@ -931,7 +931,7 @@ musycc_bh_tx_eom(mpi_t *pi, int gchan)
 #endif  /*** CONFIG_SBE_WAN256T3_NCOMM ***/
 
OS_mem_token_free_irq(md-mem_token);
-   md-mem_token = 0;
+   md-mem_token = NULL;
}
md-status = 0;
 #ifdef RLD_TXFULL_DEBUG
@@ -1012,13 +1012,13 @@ musycc_bh_rx_eom(mpi_t *pi, int gchan)
 u_int32_t   error;
 
 ch = pi-chan[gchan];
-if (ch == 0 || ch-state != UP) {
+if (!ch || ch-state != UP) {
if (cxt1e1_log_level  LOG_ERROR)
pr_info(%s: intr: receive EOM on uninitialized channel %d\n,
pi-up-devname, gchan);
return;
 }
-if (ch-mdr == 0)
+if (!ch-mdr)
return; /* can this happen ? */
 
 for (;;) {
@@ -1566,18 +1566,18 @@ musycc_chan_down(ci_t *dummy, int channum)
 pi-regram-rmp[gchan] = 0;
 FLUSH_MEM_WRITE();
 for (i = 0; i  ch-txd_num; i++)
-   if (ch-mdt[i].mem_token != 0)
+   if (ch-mdt[i].mem_token)
OS_mem_token_free(ch-mdt[i].mem_token);
 
 for (i = 0; i  ch-rxd_num; i++)
-   if (ch-mdr[i].mem_token != 0)
+   if (ch-mdr[i].mem_token)
OS_mem_token_free(ch-mdr[i].mem_token);
 
 OS_kfree(ch-mdr);
-ch-mdr = 0;
+ch-mdr = NULL;
 ch-rxd_num = 0;
 OS_kfree(ch-mdt);
-ch-mdt = 0;
+ch-mdt = NULL;
 ch-txd_num = 0;
 
 musycc_update_timeslots(pi);
@@ -1746,7 +1746,7 @@ musycc_start_xmit(ci_t *ci, int channum, void *mem_token)
 #endif
u |= (PADFILL_ENABLE | (ch-p.pad_fill_count  EXTRA_FLAGS));
}
-   md-mem_token = len ? 0 : mem_token;/* Fill in mds on last
+   md-mem_token = len ? NULL : mem_token;/* Fill in mds on last
 * segment, others set ZERO
 * so that entire token is
 * removed ONLY when ALL
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 04/11] staging: cxt1e1: linux.c: Use NULL instead of 0

2013-09-26 Thread Sachin Kamat
Pointers should be assigned NULL instead of 0.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/cxt1e1/linux.c |   26 +-
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/cxt1e1/linux.c b/drivers/staging/cxt1e1/linux.c
index 142691c..598e6ba 100644
--- a/drivers/staging/cxt1e1/linux.c
+++ b/drivers/staging/cxt1e1/linux.c
@@ -133,7 +133,7 @@ getuserbychan (int channum)
 mch_t  *ch;
 
 ch = c4_find_chan (channum);
-return ch ? ch-user : 0;
+return ch ? ch-user : NULL;
 }
 
 
@@ -245,7 +245,7 @@ c4_wq_port_cleanup (mpi_t *pi)
 {
 destroy_workqueue (pi-wq_port);/* this also calls
  * flush_workqueue() */
-pi-wq_port = 0;
+pi-wq_port = NULL;
 }
 }
 
@@ -420,7 +420,7 @@ create_chan (struct net_device *ndev, ci_t *ci,
 int ret;
 
 if (c4_find_chan (cp-channum))
-return 0;   /* channel already exists */
+return NULL;   /* channel already exists */
 
 {
 struct c4_priv *priv;
@@ -430,14 +430,14 @@ create_chan (struct net_device *ndev, ci_t *ci,
 if (!priv)
 {
 pr_warning(%s: no memory for net_device !\n, ci-devname);
-return 0;
+   return NULL;
 }
 dev = alloc_hdlcdev (priv);
 if (!dev)
 {
 pr_warning(%s: no memory for hdlc_device !\n, ci-devname);
 OS_kfree (priv);
-return 0;
+   return NULL;
 }
 priv-ci = ci;
 priv-channum = cp-channum;
@@ -496,7 +496,7 @@ create_chan (struct net_device *ndev, ci_t *ci,
 pr_info(%s: create_chan[%d] registration error = %d.\n,
 ci-devname, cp-channum, ret);
 free_netdev (dev);  /* cleanup */
-return 0;   /* failed to register */
+   return NULL;/* failed to register */
 }
 return dev;
 }
@@ -744,7 +744,7 @@ do_deluser (struct net_device *ndev, int lockit)
 ch = c4_find_chan (channum);
 if (ch == NULL)
 return -ENOENT;
-ch-user = 0;   /* will be freed, below */
+   ch-user = NULL;/* will be freed, below */
 }
 
 if (lockit)
@@ -959,7 +959,7 @@ c4_add_dev (hdw_info_t *hi, int brdno, unsigned long f0, 
unsigned long f1,
 {
 pr_warning(%s: no memory for struct net_device !\n, hi-devname);
 error_flag = ENOMEM;
-return 0;
+   return NULL;
 }
 ci = (ci_t *)(netdev_priv(ndev));
 ndev-irq = irq0;
@@ -970,7 +970,7 @@ c4_add_dev (hdw_info_t *hi, int brdno, unsigned long f0, 
unsigned long f1,
 c4_list = ci;
 ci-brdno = ci-next ? ci-next-brdno + 1 : 0;
 
-if (CI == 0)
+if (!CI)
 CI = ci;/* DEBUG, only board 0 usage */
 
 strcpy (ci-devname, hi-devname);
@@ -996,7 +996,7 @@ c4_add_dev (hdw_info_t *hi, int brdno, unsigned long f0, 
unsigned long f1,
 OS_kfree (netdev_priv(ndev));
 OS_kfree (ndev);
 error_flag = ENODEV;
-return 0;
+   return NULL;
 }
 /*
  *  int request_irq(unsigned int irq,
@@ -1022,7 +1022,7 @@ c4_add_dev (hdw_info_t *hi, int brdno, unsigned long f0, 
unsigned long f1,
 OS_kfree (netdev_priv(ndev));
 OS_kfree (ndev);
 error_flag = EIO;
-return 0;
+   return NULL;
 }
 #ifdef CONFIG_SBE_PMCC4_NCOMM
 if (request_irq (irq1, c4_ebus_interrupt, IRQF_SHARED, ndev-name, ndev))
@@ -1033,7 +1033,7 @@ c4_add_dev (hdw_info_t *hi, int brdno, unsigned long f0, 
unsigned long f1,
 OS_kfree (netdev_priv(ndev));
 OS_kfree (ndev);
 error_flag = EIO;
-return 0;
+   return NULL;
 }
 #endif
 
@@ -1091,7 +1091,7 @@ c4_add_dev (hdw_info_t *hi, int brdno, unsigned long f0, 
unsigned long f1,
 free_irq (irq0, ndev);
 OS_kfree (netdev_priv(ndev));
 OS_kfree (ndev);
-return 0;   /* failure, error_flag is set */
+   return NULL;/* failure, error_flag is set */
 }
 return ndev;
 }
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 10/11] staging: cxt1e1: hwprobe.c: Return negative error codes

2013-09-26 Thread Sachin Kamat
Return negative error codes as is followed in the rest of the
kernel.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/cxt1e1/hwprobe.c |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/cxt1e1/hwprobe.c b/drivers/staging/cxt1e1/hwprobe.c
index 2f4f051..02b4f8f 100644
--- a/drivers/staging/cxt1e1/hwprobe.c
+++ b/drivers/staging/cxt1e1/hwprobe.c
@@ -309,7 +309,7 @@ c4hw_attach_all (void)
 if (!found)
 {
 pr_warning(No boards found\n);
-return ENODEV;
+return -ENODEV;
 }
 /* sanity check for consistent hardware found */
 for (i = 0, hi = hdw_info; i  MAX_BOARDS; i++, hi++)
@@ -318,7 +318,7 @@ c4hw_attach_all (void)
 {
 pr_warning(%s: something very wrong with pci_get_device\n,
hi-devname);
-return EIO;
+return -EIO;
 }
 }
 /* bring board's memory regions on/line */
@@ -333,7 +333,7 @@ c4hw_attach_all (void)
 pr_warning(%s: memory in use, addr=0x%lx, len=0x%lx ?\n,
hi-devname, hi-addr[j], hi-len[j]);
 cleanup_ioremap ();
-return ENOMEM;
+return -ENOMEM;
 }
 hi-addr_mapped[j] = (unsigned long) ioremap (hi-addr[j], 
hi-len[j]);
 if (!hi-addr_mapped[j])
@@ -341,7 +341,7 @@ c4hw_attach_all (void)
 pr_warning(%s: ioremap fails, addr=0x%lx, len=0x%lx ?\n,
hi-devname, hi-addr[j], hi-len[j]);
 cleanup_ioremap ();
-return ENOMEM;
+return -ENOMEM;
 }
 #ifdef SBE_MAP_DEBUG
 pr_warning(%s: io remapped from phys %x to virt %x\n,
@@ -365,7 +365,7 @@ c4hw_attach_all (void)
hi-devname, i, hi-pci_slot);
 cleanup_devs ();
 cleanup_ioremap ();
-return EIO;
+return -EIO;
 }
 pci_set_master (hi-pdev[0]);
 pci_set_master (hi-pdev[1]);
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 02/11] staging: cxt1e1: sbecom_inline_linux.h: Return NULL instead of 0

2013-09-26 Thread Sachin Kamat
Functions returning pointer should return NULL instead of 0.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/cxt1e1/sbecom_inline_linux.h |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/cxt1e1/sbecom_inline_linux.h 
b/drivers/staging/cxt1e1/sbecom_inline_linux.h
index 3c6d1c0..ba3ff3e 100644
--- a/drivers/staging/cxt1e1/sbecom_inline_linux.h
+++ b/drivers/staging/cxt1e1/sbecom_inline_linux.h
@@ -73,7 +73,7 @@ OS_mem_token_alloc (size_t size)
 if (!skb)
 {
 //pr_warning(no mem in OS_mem_token_alloc !\n);
-return 0;
+return NULL;
 }
 return skb;
 }
@@ -103,7 +103,7 @@ OS_mem_token_data (void *token)
 static inline void *
 OS_mem_token_next (void *token)
 {
-return 0;
+return NULL;
 }
 
 
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 11/11] staging: cxt1e1: linux.c: Return negative error codes

2013-09-26 Thread Sachin Kamat
Return negative error codes as is followed in the rest of the
kernel.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/cxt1e1/linux.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/cxt1e1/linux.c b/drivers/staging/cxt1e1/linux.c
index 598e6ba..9b48373 100644
--- a/drivers/staging/cxt1e1/linux.c
+++ b/drivers/staging/cxt1e1/linux.c
@@ -230,7 +230,7 @@ c4_wq_port_init (mpi_t *pi)
 __func__, name, pi-portnum); /* RLD DEBUG */
 #endif
 if (!(pi-wq_port = create_singlethread_workqueue (name)))
-return ENOMEM;
+return -ENOMEM;
 return 0;   /* success */
 }
 
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 07/11] staging: cxt1e1: sbecrc.c: Use NULL instead of 0

2013-09-26 Thread Sachin Kamat
Pointers should be assigned NULL instead of 0.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/cxt1e1/sbecrc.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/cxt1e1/sbecrc.c b/drivers/staging/cxt1e1/sbecrc.c
index 87512a5..81fa8a3 100644
--- a/drivers/staging/cxt1e1/sbecrc.c
+++ b/drivers/staging/cxt1e1/sbecrc.c
@@ -88,7 +88,7 @@ sbeCrc(u_int8_t *buffer,  /* data buffer to crc */
u_int32_t initialCrc,  /* starting CRC */
u_int32_t *result)
 {
-   u_int32_t *tbl = 0;
+   u_int32_t *tbl = NULL;
u_int32_t  temp1, temp2, crc;
 
/*
@@ -102,7 +102,7 @@ sbeCrc(u_int8_t *buffer,  /* data buffer to crc */
genCrcTable(tbl);
 #else
tbl = (u_int32_t *) OS_kmalloc(CRC_TABLE_ENTRIES * 
sizeof(u_int32_t));
-   if (tbl == 0) {
+   if (!tbl) {
*result = 0;   /* dummy up return value due to malloc
* failure */
return;
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 03/11] staging: cxt1e1: sbeid.c: Use NULL instead of 0

2013-09-26 Thread Sachin Kamat
Pointers should be assigned NULL instead of 0.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/cxt1e1/sbeid.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/cxt1e1/sbeid.c b/drivers/staging/cxt1e1/sbeid.c
index 791993f..6ec51bc 100644
--- a/drivers/staging/cxt1e1/sbeid.c
+++ b/drivers/staging/cxt1e1/sbeid.c
@@ -22,7 +22,7 @@
 char   *
 sbeid_get_bdname (ci_t *ci)
 {
-char   *np = 0;
+char   *np = NULL;
 
 switch (ci-brd_id)
 {
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 09/11] staging: cxt1e1: musycc.c: Return negative error codes

2013-09-26 Thread Sachin Kamat
Return negative error codes as is followed in the rest of the
kernel.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/cxt1e1/musycc.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/cxt1e1/musycc.c b/drivers/staging/cxt1e1/musycc.c
index a2a2af1..0ba8c3a 100644
--- a/drivers/staging/cxt1e1/musycc.c
+++ b/drivers/staging/cxt1e1/musycc.c
@@ -746,7 +746,7 @@ musycc_init(ci_t *ci)
 
 regaddr = OS_kmalloc((INT_QUEUE_SIZE + 1) * sizeof(u_int32_t));
 if (!regaddr)
-   return ENOMEM;
+   return -ENOMEM;
 ci-iqd_p_saved = regaddr;  /* save orig value for free's usage */
 ci-iqd_p = (u_int32_t *) ((unsigned long) (regaddr + INT_QUEUE_BOUNDARY - 
1) 
   (~(INT_QUEUE_BOUNDARY - 1)));/* this 
calculates
@@ -772,7 +772,7 @@ musycc_init(ci_t *ci)
OS_kfree(pi-reg);
pi-reg = NULL;
}
-   return ENOMEM;
+   return -ENOMEM;
}
pi-regram_saved = regaddr; /* save orig value for free's usage */
pi-regram = (struct musycc_groupr *) ((unsigned long) (regaddr + 
GROUP_BOUNDARY - 1) 
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 5/5] staging: xgifb: Remove redundant pci_set_drvdata

2013-09-20 Thread Sachin Kamat
Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/xgifb/XGI_main_26.c |1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/xgifb/XGI_main_26.c 
b/drivers/staging/xgifb/XGI_main_26.c
index 3b3e17d..b3ff603 100644
--- a/drivers/staging/xgifb/XGI_main_26.c
+++ b/drivers/staging/xgifb/XGI_main_26.c
@@ -2070,7 +2070,6 @@ static void xgifb_remove(struct pci_dev *pdev)
release_mem_region(xgifb_info-video_base, xgifb_info-video_size);
pci_disable_device(pdev);
framebuffer_release(fb_info);
-   pci_set_drvdata(pdev, NULL);
 }
 
 static struct pci_driver xgifb_driver = {
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 4/5] staging: vt6655: Remove redundant pci_set_drvdata

2013-09-20 Thread Sachin Kamat
Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/vt6655/device_main.c |4 
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/vt6655/device_main.c 
b/drivers/staging/vt6655/device_main.c
index 7f36a71..e93fdc8 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -1153,10 +1153,6 @@ static void device_free_info(PSDevice pDevice) {
pci_release_regions(pDevice-pcid);
if (dev)
free_netdev(dev);
-
-   if (pDevice-pcid) {
-   pci_set_drvdata(pDevice-pcid, NULL);
-   }
 }
 
 static bool device_init_rings(PSDevice pDevice) {
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 3/5] staging: sm7xxfb: Remove redundant pci_set_drvdata

2013-09-20 Thread Sachin Kamat
Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/sm7xxfb/sm7xxfb.c |1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/sm7xxfb/sm7xxfb.c 
b/drivers/staging/sm7xxfb/sm7xxfb.c
index 8add64b..5c85761 100644
--- a/drivers/staging/sm7xxfb/sm7xxfb.c
+++ b/drivers/staging/sm7xxfb/sm7xxfb.c
@@ -933,7 +933,6 @@ static void smtcfb_pci_remove(struct pci_dev *pdev)
struct smtcfb_info *sfb;
 
sfb = pci_get_drvdata(pdev);
-   pci_set_drvdata(pdev, NULL);
smtc_unmap_smem(sfb);
smtc_unmap_mmio(sfb);
unregister_framebuffer(sfb-fb);
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/5] staging: rtl8187se: Remove redundant pci_set_drvdata

2013-09-20 Thread Sachin Kamat
Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8187se/r8180_core.c |1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8187se/r8180_core.c 
b/drivers/staging/rtl8187se/r8180_core.c
index 5947a6f..25f5ddd 100644
--- a/drivers/staging/rtl8187se/r8180_core.c
+++ b/drivers/staging/rtl8187se/r8180_core.c
@@ -3268,7 +3268,6 @@ fail_free:
pci_disable_device(pdev);
 
DMESG(wlan driver load failed\n);
-   pci_set_drvdata(pdev, NULL);
return ret;
 }
 
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/5] staging: rtl8192e: Remove redundant pci_set_drvdata

2013-09-20 Thread Sachin Kamat
Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8192e/rtl8192e/rtl_core.c |1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c 
b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index e068443..7d322f3 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -2982,7 +2982,6 @@ err_rel_rtllib:
free_rtllib(dev);
 
DMESG(wlan driver load failed\n);
-   pci_set_drvdata(pdev, NULL);
 err_pci_disable:
pci_disable_device(pdev);
return err;
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 2/2] staging: dgap: Remove unnecessary version check

2013-08-31 Thread Sachin Kamat
On 31 August 2013 00:00, Greg KH gre...@linuxfoundation.org wrote:
 On Thu, Aug 29, 2013 at 03:36:55PM +0530, Sachin Kamat wrote:
 Code should be for the kernel version it is merged in. Version
 check is not necessary.

 Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
 ---
 Compile tested only.
 ---
  drivers/staging/dgap/dgap_driver.c  |4 
  drivers/staging/dgap/dgap_kcompat.h |   29 -
  2 files changed, 33 deletions(-)

 This patch doesn't apply either, what went wrong with these?

A patch similar to my first patch already got applied to your tree due
to which both these failed to apply.


 Care to refresh them and try again?

I have refreshed, split and resent the second patch (this one) based
on your latest staging-next.

-- 
With warm regards,
Sachin
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/2] staging: dgap: Remove version check in dgap_driver.c

2013-08-30 Thread Sachin Kamat
Code should be for the kernel version it is merged in.
Version check is not necessary.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
Compile tested only.
---
 drivers/staging/dgap/dgap_driver.c |4 
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/dgap/dgap_driver.c 
b/drivers/staging/dgap/dgap_driver.c
index 724a685..65d7ee0 100644
--- a/drivers/staging/dgap/dgap_driver.c
+++ b/drivers/staging/dgap/dgap_driver.c
@@ -32,16 +32,12 @@
 
 
 #include linux/kernel.h
-#include linux/version.h
 #include linux/module.h
 #include linux/pci.h
 #include linux/delay.h   /* For udelay */
 #include linux/slab.h
 #include asm/uaccess.h   /* For copy_from_user/copy_to_user */
-
-#if LINUX_VERSION_CODE = KERNEL_VERSION(2,6,39)
 #include linux/sched.h
-#endif
 
 #include dgap_driver.h
 #include dgap_pci.h
-- 
1.7.4.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/2] staging: dgap: Fix build errors

2013-08-29 Thread Sachin Kamat
Fixes the following compilation errors:
drivers/staging/dgap/dgap_driver.c:423:3: error:
implicit declaration of function ‘kfree’ [-Werror=implicit-function-declaration]
kfree(dgap_config_buf);
^
drivers/staging/dgap/dgap_driver.c: In function ‘dgap_driver_kzmalloc’:
drivers/staging/dgap/dgap_driver.c:940:3: error: implicit
declaration of function ‘kmalloc’ [-Werror=implicit-function-declaration]

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/dgap/dgap_driver.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/dgap/dgap_driver.c 
b/drivers/staging/dgap/dgap_driver.c
index 9f777e4..724a685 100644
--- a/drivers/staging/dgap/dgap_driver.c
+++ b/drivers/staging/dgap/dgap_driver.c
@@ -36,6 +36,7 @@
 #include linux/module.h
 #include linux/pci.h
 #include linux/delay.h   /* For udelay */
+#include linux/slab.h
 #include asm/uaccess.h   /* For copy_from_user/copy_to_user */
 
 #if LINUX_VERSION_CODE = KERNEL_VERSION(2,6,39)
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/2] staging: dgap: Remove unnecessary version check

2013-08-29 Thread Sachin Kamat
Code should be for the kernel version it is merged in. Version
check is not necessary.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
Compile tested only.
---
 drivers/staging/dgap/dgap_driver.c  |4 
 drivers/staging/dgap/dgap_kcompat.h |   29 -
 2 files changed, 33 deletions(-)

diff --git a/drivers/staging/dgap/dgap_driver.c 
b/drivers/staging/dgap/dgap_driver.c
index 724a685..65d7ee0 100644
--- a/drivers/staging/dgap/dgap_driver.c
+++ b/drivers/staging/dgap/dgap_driver.c
@@ -32,16 +32,12 @@
 
 
 #include linux/kernel.h
-#include linux/version.h
 #include linux/module.h
 #include linux/pci.h
 #include linux/delay.h   /* For udelay */
 #include linux/slab.h
 #include asm/uaccess.h   /* For copy_from_user/copy_to_user */
-
-#if LINUX_VERSION_CODE = KERNEL_VERSION(2,6,39)
 #include linux/sched.h
-#endif
 
 #include dgap_driver.h
 #include dgap_pci.h
diff --git a/drivers/staging/dgap/dgap_kcompat.h 
b/drivers/staging/dgap/dgap_kcompat.h
index 8ebf4b7..0dc2404 100644
--- a/drivers/staging/dgap/dgap_kcompat.h
+++ b/drivers/staging/dgap/dgap_kcompat.h
@@ -28,11 +28,6 @@
 #ifndef __DGAP_KCOMPAT_H
 #define __DGAP_KCOMPAT_H
 
-# ifndef KERNEL_VERSION
-#  define KERNEL_VERSION(a,b,c)  (((a)  16) + ((b)  8) + (c))
-# endif
-
-
 #if !defined(TTY_FLIPBUF_SIZE)
 # define TTY_FLIPBUF_SIZE 512
 #endif
@@ -66,28 +61,4 @@
module_param(VAR, long, PERM); \
MODULE_PARM_DESC(VAR, DESC);
 
-
-
-
-
-#if LINUX_VERSION_CODE = KERNEL_VERSION(2,6,27)
-
-
-
-
-/* NOTHING YET */
-
-
-
-
-# else
-
-
-
-# error this driver does not support anything below the 2.6.27 kernel series.
-
-
-
-# endif
-
 #endif /* ! __DGAP_KCOMPAT_H */
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/3] staging: rtl8188eu: Include version.h in usb_ops.h

2013-08-28 Thread Sachin Kamat
Include version.h header file as detected by versioncheck.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8188eu/include/usb_ops.h |1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/rtl8188eu/include/usb_ops.h 
b/drivers/staging/rtl8188eu/include/usb_ops.h
index c23de7b..df34237 100644
--- a/drivers/staging/rtl8188eu/include/usb_ops.h
+++ b/drivers/staging/rtl8188eu/include/usb_ops.h
@@ -20,6 +20,7 @@
 #ifndef __USB_OPS_H_
 #define __USB_OPS_H_
 
+#include linux/version.h
 #include osdep_service.h
 #include drv_types.h
 #include osdep_intf.h
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/2] staging: rtl8188eu: Remove duplicate header inclusion in ioctl_linux.c

2013-08-28 Thread Sachin Kamat
Removed the header files included twice.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Cc: Larry Finger larry.fin...@lwfinger.net
---
 drivers/staging/rtl8188eu/os_dep/ioctl_linux.c |2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c 
b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
index d438256..cd4100f 100644
--- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
@@ -29,13 +29,11 @@
 #include rtw_ioctl.h
 #include rtw_ioctl_set.h
 #include rtw_mp_ioctl.h
-#include rtw_mp_ioctl.h
 #include usb_ops.h
 #include rtw_version.h
 #include rtl8188e_hal.h
 
 #include rtw_mp.h
-#include rtl8188e_hal.h
 #include rtw_iol.h
 
 #define RTL_IOCTL_WPA_SUPPLICANT   (SIOCIWFIRSTPRIV + 30)
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH Resend 1/4] staging: dgap: Include version.h header in dgap_kcompat.h

2013-08-28 Thread Sachin Kamat
On 29 August 2013 03:45, Greg KH gre...@linuxfoundation.org wrote:
 On Wed, Aug 28, 2013 at 10:35:46AM +0530, Sachin Kamat wrote:
 Include version.h header file as detected by versioncheck.

 Cc: Lidza Louina lidza.lou...@gmail.com
 Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
 ---
  drivers/staging/dgap/dgap_kcompat.h |2 ++
  1 file changed, 2 insertions(+)

 diff --git a/drivers/staging/dgap/dgap_kcompat.h 
 b/drivers/staging/dgap/dgap_kcompat.h
 index 8ebf4b7..f21c8d7 100644
 --- a/drivers/staging/dgap/dgap_kcompat.h
 +++ b/drivers/staging/dgap/dgap_kcompat.h
 @@ -28,6 +28,8 @@
  #ifndef __DGAP_KCOMPAT_H
  #define __DGAP_KCOMPAT_H

 +#include linux/version.h

 Please just remove the KERNEL_VERSION check, and the use of the macro in
 this file entirely, as it's pointless here.

Agreed. That was my initial thought too.
Will update and re-spin.


-- 
With warm regards,
Sachin
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/4] staging: dgap: Include version.h header in dgap_kcompat.h

2013-08-27 Thread Sachin Kamat
Include version.h header file as detected by versioncheck.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/dgap/dgap_kcompat.h |2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/staging/dgap/dgap_kcompat.h 
b/drivers/staging/dgap/dgap_kcompat.h
index 8ebf4b7..f21c8d7 100644
--- a/drivers/staging/dgap/dgap_kcompat.h
+++ b/drivers/staging/dgap/dgap_kcompat.h
@@ -28,6 +28,8 @@
 #ifndef __DGAP_KCOMPAT_H
 #define __DGAP_KCOMPAT_H
 
+#include linux/version.h
+
 # ifndef KERNEL_VERSION
 #  define KERNEL_VERSION(a,b,c)  (((a)  16) + ((b)  8) + (c))
 # endif
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 3/4] staging: dgap: Remove version.h header inclusion in dgap_sysfs.c

2013-08-27 Thread Sachin Kamat
version.h header inclusion is not necessary as detected by
versioncheck.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/dgap/dgap_sysfs.c |1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/dgap/dgap_sysfs.c 
b/drivers/staging/dgap/dgap_sysfs.c
index d4300ce..94da06f 100644
--- a/drivers/staging/dgap/dgap_sysfs.c
+++ b/drivers/staging/dgap/dgap_sysfs.c
@@ -34,7 +34,6 @@
 
 
 #include linux/kernel.h
-#include linux/version.h
 #include linux/module.h
 #include linux/ctype.h
 #include linux/string.h
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 3/3] staging: rtl8188eu: Include version.h header in xmit_linux.c

2013-08-27 Thread Sachin Kamat
Include version.h header file as detected by versioncheck.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8188eu/os_dep/xmit_linux.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/rtl8188eu/os_dep/xmit_linux.c 
b/drivers/staging/rtl8188eu/os_dep/xmit_linux.c
index 1e2c8ab..2e586c0 100644
--- a/drivers/staging/rtl8188eu/os_dep/xmit_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/xmit_linux.c
@@ -19,6 +19,7 @@
  
**/
 #define _XMIT_OSDEP_C_
 
+#include linux/version.h
 #include osdep_service.h
 #include drv_types.h
 
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/3] staging: rtl8188eu: Remove version.h inclusion in osdep_service.h

2013-08-27 Thread Sachin Kamat
version.h header inclusion is not necessary as detected by
versioncheck.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/rtl8188eu/include/osdep_service.h |1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h 
b/drivers/staging/rtl8188eu/include/osdep_service.h
index 1be33b7..44f24fa 100644
--- a/drivers/staging/rtl8188eu/include/osdep_service.h
+++ b/drivers/staging/rtl8188eu/include/osdep_service.h
@@ -26,7 +26,6 @@
 #define _SUCCESS   1
 #define RTW_RX_HANDLED 2
 
-#include linux/version.h
 #include linux/spinlock.h
 #include linux/compiler.h
 #include linux/kernel.h
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/1] staging: xillybus: Remove duplicate inclusion of list.h

2013-08-22 Thread Sachin Kamat
list.h header file was included twice.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/xillybus/xillybus.h |1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/xillybus/xillybus.h 
b/drivers/staging/xillybus/xillybus.h
index d3fc8aa..e5e91d6 100644
--- a/drivers/staging/xillybus/xillybus.h
+++ b/drivers/staging/xillybus/xillybus.h
@@ -21,7 +21,6 @@
 #include linux/cdev.h
 #include linux/spinlock.h
 #include linux/mutex.h
-#include linux/list.h
 #include linux/workqueue.h
 
 struct xilly_endpoint_hardware;
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/7] staging: dgnc: Remove version.h header inclusion in dgnc_driver.h

2013-08-02 Thread Sachin Kamat
version.h header inclusion is not necessary as detected by
versioncheck.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/dgnc/dgnc_driver.h |1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/dgnc/dgnc_driver.h 
b/drivers/staging/dgnc/dgnc_driver.h
index 43177f4..334faae 100644
--- a/drivers/staging/dgnc/dgnc_driver.h
+++ b/drivers/staging/dgnc/dgnc_driver.h
@@ -27,7 +27,6 @@
 #ifndef __DGNC_DRIVER_H
 #define __DGNC_DRIVER_H
 
-#include linux/version.h /* To get the current Linux version */
 #include linux/types.h   /* To pick up the varions Linux types */
 #include linux/tty.h  /* To pick up the various tty structs/defines 
*/
 #include linux/interrupt.h   /* For irqreturn_t type */
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 5/7] staging: dgnc: Remove version.h header inclusion in dgnc_neo.c

2013-08-02 Thread Sachin Kamat
version.h header inclusion is not necessary as detected by
versioncheck.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/dgnc/dgnc_neo.c |1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c
index 503db8f..9ac7149 100644
--- a/drivers/staging/dgnc/dgnc_neo.c
+++ b/drivers/staging/dgnc/dgnc_neo.c
@@ -33,7 +33,6 @@
 
 
 #include linux/kernel.h
-#include linux/version.h
 #include linux/sched.h   /* For jiffies, task states */
 #include linux/interrupt.h/* For tasklet and interrupt structs/defines */
 #include linux/delay.h   /* For udelay */
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 7/7] staging: dgnc: Remove version.h header inclusion in dgnc_trace.c

2013-08-02 Thread Sachin Kamat
version.h header inclusion is not necessary as detected by
versioncheck.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/dgnc/dgnc_trace.c |1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/dgnc/dgnc_trace.c 
b/drivers/staging/dgnc/dgnc_trace.c
index ea710e5..e613a28 100644
--- a/drivers/staging/dgnc/dgnc_trace.c
+++ b/drivers/staging/dgnc/dgnc_trace.c
@@ -32,7 +32,6 @@
 /* $Id: dgnc_trace.c,v 1.1.1.1 2009/05/20 12:19:19 markh Exp $ */
 
 #include linux/kernel.h
-#include linux/version.h
 #include linux/sched.h   /* For jiffies, task states */
 #include linux/interrupt.h   /* For tasklet and interrupt structs/defines */
 #include linux/vmalloc.h
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 12/16] staging: lustre: Remove duplicate header file inclusion in lmv_fld.c

2013-07-25 Thread Sachin Kamat
Removed the header file included twice.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/lustre/lustre/lmv/lmv_fld.c |1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/lmv/lmv_fld.c 
b/drivers/staging/lustre/lustre/lmv/lmv_fld.c
index a4805ae..08a5b69 100644
--- a/drivers/staging/lustre/lustre/lmv/lmv_fld.c
+++ b/drivers/staging/lustre/lustre/lmv/lmv_fld.c
@@ -38,7 +38,6 @@
 #include linux/slab.h
 #include linux/module.h
 #include linux/init.h
-#include linux/slab.h
 #include linux/pagemap.h
 #include asm/div64.h
 #include linux/seq_file.h
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 07/16] staging: lustre: Remove duplicate header file inclusion in dir.c

2013-07-25 Thread Sachin Kamat
Removed the header files included twice.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/lustre/lustre/llite/dir.c |1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/llite/dir.c 
b/drivers/staging/lustre/lustre/llite/dir.c
index 002b374..2ca8c45 100644
--- a/drivers/staging/lustre/lustre/llite/dir.c
+++ b/drivers/staging/lustre/lustre/llite/dir.c
@@ -48,7 +48,6 @@
 
 #define DEBUG_SUBSYSTEM S_LLITE
 
-#include lustre/lustre_idl.h
 #include obd_support.h
 #include obd_class.h
 #include lustre_lib.h
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 04/16] staging: lustre: linux-debug: Remove duplicate inclusion of header file

2013-07-25 Thread Sachin Kamat
Removed the header files included twice.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 .../lustre/lustre/libcfs/linux/linux-debug.c   |3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-debug.c 
b/drivers/staging/lustre/lustre/libcfs/linux/linux-debug.c
index 0069b5e..6afb350 100644
--- a/drivers/staging/lustre/lustre/libcfs/linux/linux-debug.c
+++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-debug.c
@@ -48,11 +48,8 @@
 #include linux/errno.h
 #include linux/unistd.h
 #include linux/interrupt.h
-#include asm/uaccess.h
 #include linux/completion.h
-
 #include linux/fs.h
-#include linux/stat.h
 #include asm/uaccess.h
 #include linux/miscdevice.h
 
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 01/16] staging: lustre: o2iblnd: Remove duplicate inclusion of header file

2013-07-25 Thread Sachin Kamat
Removed the header files included twice.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h|1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h 
b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h
index e4626bf..938df0c 100644
--- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h
+++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h
@@ -53,7 +53,6 @@
 #include linux/init.h
 #include linux/fs.h
 #include linux/file.h
-#include linux/stat.h
 #include linux/list.h
 #include linux/kmod.h
 #include linux/sysctl.h
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 15/16] staging: lustre: Remove duplicate header file inclusion in lvfs_linux.c

2013-07-25 Thread Sachin Kamat
Removed the header file included twice.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 drivers/staging/lustre/lustre/lvfs/lvfs_linux.c |1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/lvfs/lvfs_linux.c 
b/drivers/staging/lustre/lustre/lvfs/lvfs_linux.c
index 9d19d0a..0f38791 100644
--- a/drivers/staging/lustre/lustre/lvfs/lvfs_linux.c
+++ b/drivers/staging/lustre/lustre/lvfs/lvfs_linux.c
@@ -46,7 +46,6 @@
 #include linux/pagemap.h
 #include linux/quotaops.h
 #include linux/libcfs/libcfs.h
-#include obd.h
 #include linux/module.h
 #include linux/init.h
 #include linux/lustre_compat25.h
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


  1   2   >