linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] compat: backport usb_alloc_coherent() and  usb_free_coherent()
@ 2010-05-03 18:36 Hauke Mehrtens
  2010-05-03 19:10 ` Pavel Roskin
  0 siblings, 1 reply; 4+ messages in thread
From: Hauke Mehrtens @ 2010-05-03 18:36 UTC (permalink / raw)
  To: lrodriguez; +Cc: linux-wireless, mcgrof, Hauke Mehrtens


Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 include/linux/compat-2.6.35.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/linux/compat-2.6.35.h b/include/linux/compat-2.6.35.h
index 9132ecb..62c54cf 100644
--- a/include/linux/compat-2.6.35.h
+++ b/include/linux/compat-2.6.35.h
@@ -19,6 +19,8 @@ static inline wait_queue_head_t *sk_sleep(struct sock *sk)
 {
 	return sk->sk_sleep;
 }
+#define usb_alloc_coherent usb_buffer_alloc
+#define usb_free_coherent usb_buffer_free
 
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)) */
 
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] compat: backport usb_alloc_coherent() and usb_free_coherent()
  2010-05-03 18:36 [PATCH] compat: backport usb_alloc_coherent() and usb_free_coherent() Hauke Mehrtens
@ 2010-05-03 19:10 ` Pavel Roskin
  2010-05-03 19:36   ` [PATCH v2] " Hauke Mehrtens
  0 siblings, 1 reply; 4+ messages in thread
From: Pavel Roskin @ 2010-05-03 19:10 UTC (permalink / raw)
  To: Hauke Mehrtens; +Cc: lrodriguez, linux-wireless, mcgrof

On Mon, 2010-05-03 at 20:36 +0200, Hauke Mehrtens wrote:
> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
> ---
>  include/linux/compat-2.6.35.h |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/include/linux/compat-2.6.35.h b/include/linux/compat-2.6.35.h
> index 9132ecb..62c54cf 100644
> --- a/include/linux/compat-2.6.35.h
> +++ b/include/linux/compat-2.6.35.h
> @@ -19,6 +19,8 @@ static inline wait_queue_head_t *sk_sleep(struct sock *sk)
>  {
>  	return sk->sk_sleep;
>  }
> +#define usb_alloc_coherent usb_buffer_alloc
> +#define usb_free_coherent usb_buffer_free

I believe macros with arguments are preferred.

It really matters in case of simple names that can be reasonably used as
variable names as well (e.g. "max").

In this case, it's more a matter of style and readability.
 
-- 
Regards,
Pavel Roskin

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2] compat: backport usb_alloc_coherent() and  usb_free_coherent()
  2010-05-03 19:10 ` Pavel Roskin
@ 2010-05-03 19:36   ` Hauke Mehrtens
  2010-05-03 23:58     ` Luis R. Rodriguez
  0 siblings, 1 reply; 4+ messages in thread
From: Hauke Mehrtens @ 2010-05-03 19:36 UTC (permalink / raw)
  To: lrodriguez; +Cc: linux-wireless, mcgrof, proski, Hauke Mehrtens


Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 v2: Add arguments to define

 include/linux/compat-2.6.35.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/include/linux/compat-2.6.35.h b/include/linux/compat-2.6.35.h
index 9132ecb..9c6e696 100644
--- a/include/linux/compat-2.6.35.h
+++ b/include/linux/compat-2.6.35.h
@@ -20,6 +20,9 @@ static inline wait_queue_head_t *sk_sleep(struct sock *sk)
 	return sk->sk_sleep;
 }
 
+#define usb_alloc_coherent(dev, size, mem_flags, dma) usb_buffer_alloc(dev, size, mem_flags, dma)
+#define usb_free_coherent(dev, size, addr, dma) usb_buffer_free(dev, size, addr, dma)
+
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)) */
 
 #endif /* LINUX_26_35_COMPAT_H */
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] compat: backport usb_alloc_coherent() and usb_free_coherent()
  2010-05-03 19:36   ` [PATCH v2] " Hauke Mehrtens
@ 2010-05-03 23:58     ` Luis R. Rodriguez
  0 siblings, 0 replies; 4+ messages in thread
From: Luis R. Rodriguez @ 2010-05-03 23:58 UTC (permalink / raw)
  To: Hauke Mehrtens; +Cc: linux-wireless, mcgrof, proski

On Mon, May 3, 2010 at 12:36 PM, Hauke Mehrtens <hauke@hauke-m.de> wrote:
>
> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
> ---
>  v2: Add arguments to define

Thanks applied.

  Luis

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-05-03 23:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-03 18:36 [PATCH] compat: backport usb_alloc_coherent() and usb_free_coherent() Hauke Mehrtens
2010-05-03 19:10 ` Pavel Roskin
2010-05-03 19:36   ` [PATCH v2] " Hauke Mehrtens
2010-05-03 23:58     ` Luis R. Rodriguez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).