From patchwork Sun Jul 10 19:51:09 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 160 Return-path: Envelope-to: mchehab@infradead.org Delivery-date: Sun, 10 Jul 2011 21:09:17 -0300 Received: from mchehab by infradead.org with local (Exim 4.72) (envelope-from ) id 1Qg43o-0008U5-J3 for mchehab@infradead.org; Sun, 10 Jul 2011 21:09:16 -0300 Received: from casper.infradead.org [85.118.1.10] by pedra with IMAP (fetchmail-6.3.17) for (single-drop); Sun, 10 Jul 2011 21:09:16 -0300 (BRT) Received: from vger.kernel.org ([209.132.180.67]) by casper.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Qg0Db-0001mu-Ng; Sun, 10 Jul 2011 20:03:08 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755374Ab1GJUAh (ORCPT + 1 other); Sun, 10 Jul 2011 16:00:37 -0400 Received: from oproxy4-pub.bluehost.com ([69.89.21.11]:35417 "HELO oproxy4-pub.bluehost.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1754888Ab1GJUAg (ORCPT ); Sun, 10 Jul 2011 16:00:36 -0400 Received: (qmail 21102 invoked by uid 0); 10 Jul 2011 20:00:35 -0000 Received: from unknown (HELO box742.bluehost.com) (66.147.244.242) by cpoproxy1.bluehost.com with SMTP; 10 Jul 2011 20:00:34 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=xenotime.net; h=Received:Date:From:To:Cc:Subject:Message-Id:Organization:X-Mailer:Mime-Version:Content-Type:Content-Transfer-Encoding:X-Identified-User; b=Fxf/NEsHGnCV3bY8VeRP1g7zs9xhBmo4Z6PFZIO5FuP5/tm6yYqu1YIgbxeqSQUgur/4AhlnC+S4J22SrfL0Jt14i/hK45KsgE3IMfclMDcXACbQOZgJBoG0s88QL57z; Received: from static-50-53-38-135.bvtn.or.frontiernet.net ([50.53.38.135] helo=chimera.site) by box742.bluehost.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1Qg0B7-00025Q-HT; Sun, 10 Jul 2011 14:00:34 -0600 Date: Sun, 10 Jul 2011 12:51:09 -0700 From: Randy Dunlap To: lkml Cc: linux-kbuild@vger.kernel.org, linux-media@vger.kernel.org, mchehab@infradead.org Subject: [PATCH 1/9] stringify: add HEX_STRING() Message-Id: <20110710125109.c72f9c2d.rdunlap@xenotime.net> Organization: YPO4 X-Mailer: Sylpheed 2.7.1 (GTK+ 2.16.6; x86_64-unknown-linux-gnu) Mime-Version: 1.0 X-Identified-User: {1807:box742.bluehost.com:xenotime:xenotime.net} {sentby:smtp auth 50.53.38.135 authed with rdunlap@xenotime.net} Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Sender: From: Randy Dunlap Add HEX_STRING(value) to stringify.h so that drivers can convert kconfig hex values (without leading "0x") to useful hex constants. Several drivers/media/radio/ drivers need this. I haven't checked if any other drivers need to do this. Alternatively, kconfig could produce hex config symbols with leading "0x". Signed-off-by: Randy Dunlap --- include/linux/stringify.h | 7 +++++++ 1 file changed, 7 insertions(+) NOTE: The other 8 patches are on lkml and linux-media mailing lists. -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- linux-next-20110707.orig/include/linux/stringify.h +++ linux-next-20110707/include/linux/stringify.h @@ -9,4 +9,11 @@ #define __stringify_1(x...) #x #define __stringify(x...) __stringify_1(x) +/* + * HEX_STRING(value) is useful for CONFIG_ values that are in hex, + * but kconfig does not put a leading "0x" on them. + */ +#define HEXSTRINGVALUE(h, value) h##value +#define HEX_STRING(value) HEXSTRINGVALUE(0x, value) + #endif /* !__LINUX_STRINGIFY_H */