From patchwork Mon Feb 15 05:26:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 8309901 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 02D63C02AA for ; Mon, 15 Feb 2016 05:35:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1A58A204D8 for ; Mon, 15 Feb 2016 05:35:36 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id CAE8F20462 for ; Mon, 15 Feb 2016 05:35:34 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id C717326172B; Mon, 15 Feb 2016 06:35:33 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Status: No, score=-1.8 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 4CA05261501; Mon, 15 Feb 2016 06:30:19 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 1D44A265182; Mon, 15 Feb 2016 06:30:17 +0100 (CET) Received: from relmlie2.idc.renesas.com (relmlor3.renesas.com [210.160.252.173]) by alsa0.perex.cz (Postfix) with ESMTP id 6BA4E2619EA for ; Mon, 15 Feb 2016 06:26:36 +0100 (CET) Received: from unknown (HELO relmlir1.idc.renesas.com) ([10.200.68.151]) by relmlie2.idc.renesas.com with ESMTP; 15 Feb 2016 14:26:35 +0900 Received: from relmlac4.idc.renesas.com (relmlac4.idc.renesas.com [10.200.69.24]) by relmlir1.idc.renesas.com (Postfix) with ESMTP id 27BA14E57B; Mon, 15 Feb 2016 14:26:35 +0900 (JST) Received: by relmlac4.idc.renesas.com (Postfix, from userid 0) id 1D807480A4; Mon, 15 Feb 2016 14:26:35 +0900 (JST) Received: from relmlac4.idc.renesas.com (localhost [127.0.0.1]) by relmlac4.idc.renesas.com (Postfix) with ESMTP id 1803F480A3; Mon, 15 Feb 2016 14:26:35 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac4.idc.renesas.com with ESMTP id QCA20153; Mon, 15 Feb 2016 14:26:35 +0900 X-IronPort-AV: E=Sophos;i="5.22,449,1449500400"; d="scan'";a="205589163" Received: from mail-sg2apc01lp0241.outbound.protection.outlook.com (HELO APC01-SG2-obe.outbound.protection.outlook.com) ([65.55.88.241]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA; 15 Feb 2016 14:26:34 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector1-renesas-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Oad8LvXwJCiUszzwskMAHNFN1FxITkaEbT7k/Y8pScg=; b=lwl0URN+2A+V2RfFIJqJEifsNWsbIzUStU3r4wyro4TneGtEmsiUKqBcPLqGfpCQlbylndOWon/fTN0JvmEnYVe7mlJPZT4HShp56i/KPjkO4Yo3j8bobvDsfTJzwYzecHaaMC5WGShJd+o15myGe9x1CBoYk7ZjfCZn0nzINfc= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none; kernel.org; dmarc=none action=none header.from=renesas.com; Received: from morimoto-PC.renesas.com (211.11.155.144) by HK2PR06MB1012.apcprd06.prod.outlook.com (10.161.188.28) with Microsoft SMTP Server (TLS) id 15.1.409.15; Mon, 15 Feb 2016 05:26:32 +0000 Message-ID: <87si0uh7jm.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") To: Mark Brown , Greg KH In-Reply-To: <87d1ryimdz.wl%kuninori.morimoto.gx@renesas.com> References: <87d1ryimdz.wl%kuninori.morimoto.gx@renesas.com> Date: Mon, 15 Feb 2016 05:26:32 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TY1PR01CA0029.jpnprd01.prod.outlook.com (25.164.162.139) To HK2PR06MB1012.apcprd06.prod.outlook.com (25.161.188.28) X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB1012; 2:NC1Dmg/aHQGABJqQeVRZqKJZkrk5dfIuqjZtVlFC+6KKRL7EU5gZFMQLTh9YEjEw931n/YtieXZ029SP9fozH8GpPCqLLfGJ8dtwzv8wQLCSFxiIOy1J7ey2DRReIb+w4sVgzSWT+4bqrVx7rVFd4g==; 3:mMaq/RHabr7ZSmpDO1vVniUpzGnzCXCath/7d78r9Ps1QayzPBCfgUBiEuH+RFAXXnaSCLeGTYR84CN+oX2FO5EMw93p8m4UyVKOx87bvTOmPNMW5H0YzAj9QkhGsImZ; 25:X2chtWpRDVkCjya6+y5Gmb57Jio4IOKb9N1zcQ6RHZaQGd+4q3EMLd8mfs6d/kmOgLbJDu5Kaxg4HDlYNX6/BwY0JToo04wL9j8W0Hclt/bY2a6WFHDPXE1XWKvo7ze7x4GXo3kyqc0HDxmbZAx3LZ0Gn23IhWbVNVEpWXedK6m44IDVshR9Sd6/WhMg1iPXNnzdWLTNfioq13foILOCHul++S3DjwX8TAsKRByB30tw3Van6PSxu+WcSXOLhhd+OjzSf2Gsg+Bf90+B5qERAj0dSxtPQ10OM6xxNPjbv3F6R7BNUx2NNr1UrxY/dQP1 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:HK2PR06MB1012; X-MS-Office365-Filtering-Correlation-Id: 166011df-edf0-4541-b123-08d335c890f1 X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB1012; 20:AGHNzA690oL5CJ49qEA3H2yotTJS2sF0lBFqzYbbs7+3glC3BrX8K/AqB6tfRPBvUC/E2pYXGreCXWFybbOp37FvNcY0KtC3S08nYXooMLQKHIHMzpvbEdD2G173xqyXGQSIodqlxCNRUdd6lUn8laIdSdv4obHsk3Kz5UmLVHqLHUwBqGlXx+3B7r6E2pKrD9NI0c0TCMSx3DjBvJka2Kg41thB9TCjqJaOHQH1yg6AVa8MmL16TnclF8uLyi6x/zyYO3Bu/v05z4p8e6EUPWRfcyhMUJMtCLsHJDudTjC5o1qlh5vD0vP2Bgp3fS32dG+qd5Xqu85Cne9fjz3IRWq3IFkFFwySfBTy0It8bv/zOo0mfGEz+wtVLOu5/95tkkDRjp/R5jz3uI92p/YhkB39AHQ6X/aFTGlhO08djiZ1QepgM9yVAWc8Bcu0A+xCR7Uh74NH/Y+nNZ98gLslAUH5mABVGZjDIVJTWmgllWnBwgKwv+/jv3mH8egyKGyd; 4:HEde3ujeucQ9yTcVLS/k/af7M1pPBG8WW12aKoIC6CbzRKsUwQowkXSmaN3xTCUMV1F/l/sDTBTxhhFTkqs1oE579YxkFVlDzChZyXAa94dsl24RREHtRTUmCDtGhwImGfEY5Kdr9gz1XB8w5qFs0DQ8pXdlUWiB4Xt4LoQG5+ljCSD03F4T1Lc5ojZOq47cx4fwHMnbs7BTGoBUURPSf6yrF856VMR/cXCSgAn0WM4S2cR5jamyw5/yjyGkFs6HNxxGCLF38teO+ajmYvUzkJhQnyPcOWX2uG4OPxCrovsPw9egqnKUldc9kxRudWzYQguHGScd7zwj1P97xBOPFWVnaqu6Kl6uw7NXScYAQYiiDf7EDytPD0LH/9ecGl1/ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046); SRVR:HK2PR06MB1012; BCL:0; PCL:0; RULEID:; SRVR:HK2PR06MB1012; X-Forefront-PRVS: 08534B37A7 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(87976001)(229853001)(19580405001)(19580395003)(50466002)(5008740100001)(40100003)(77096005)(6116002)(5004730100002)(586003)(23726003)(86362001)(122386002)(2950100001)(83506001)(3846002)(92566002)(4001350100001)(42186005)(1096002)(66066001)(50986999)(47776003)(4326007)(33646002)(189998001)(46406003)(76176999)(2906002)(5001960100002)(5001770100001)(53416004)(36756003)(54356999); DIR:OUT; SFP:1102; SCL:1; SRVR:HK2PR06MB1012; H:morimoto-PC.renesas.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HK2PR06MB1012; 23:HOsuLjf+oxkXR2B1JBgfvdw9PnrUMHOPjBfWIvgjH?= =?us-ascii?Q?oVBhFgnlWGlzjSoI9m9xrbvlhmCUV3ZgxZRqERCahJH016tSVNvKNexswLMP?= =?us-ascii?Q?cXCblAyzrXTXfFdCIaVYT2Pti6wmCxDqDBExW0zOLQO9Oc7J3n9LBa/4zk+V?= =?us-ascii?Q?tFY0U3JYrQhhu/4nT92OCmuEL+naJdJHXiCKEAg9e7gR9tEdkg2YBldRNHXE?= =?us-ascii?Q?LchmSnerxLYflyVFk8vFixSLKLwW3CkzWQj/HaGiTUnPisFG/+I56ZPC5eqO?= =?us-ascii?Q?l9wR6RPML/oaeF+sn43Y2wBAjT8TLVMMlJRHjzU8X5xFZ7mmj3X6bx6YCRwk?= =?us-ascii?Q?1Yxa3NFld0wwgRMPC9/BrBVdt1gt/AF2hsC4X2eo2uMSEw3/8qAEcC8QtscK?= =?us-ascii?Q?kKNV50GyoQNsZxZrHqUkadVqxDG9Vg8A3pc5NSW58/uZL5yMZKkGKSdfz7b/?= =?us-ascii?Q?2EefNzhxpovDn0+4+Y5EgX/bXU+052oG4Uaz2aEcHEIK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4IiBFgWgGExtneXhJ4UCMZ91jCZ9ZsQ43UUXjgPXSrJqAU= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2016 05:26:32.6955 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK2PR06MB1012 Cc: Linux-ALSA , Linux-Kernel Subject: [alsa-devel] [PATCH 14/15 v2][RFC] regmpa: remove regmap_write_bits() X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Kuninori Morimoto We can use _force_ write by regmap_update_bits_base() option. Let's remove unused regmap_write_bits() Signed-off-by: Kuninori Morimoto --- drivers/base/regmap/regmap.c | 23 ----------------------- include/linux/regmap.h | 9 --------- 2 files changed, 32 deletions(-) diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index c7d4a63..3fb04c3 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -2650,29 +2650,6 @@ int regmap_update_bits_base(struct regmap *map, unsigned int reg, } EXPORT_SYMBOL_GPL(regmap_update_bits_base); -/** - * regmap_write_bits: Perform a read/modify/write cycle on the register map - * - * @map: Register map to update - * @reg: Register to update - * @mask: Bitmask to change - * @val: New value for bitmask - * - * Returns zero for success, a negative number on error. - */ -int regmap_write_bits(struct regmap *map, unsigned int reg, - unsigned int mask, unsigned int val) -{ - int ret; - - map->lock(map->lock_arg); - ret = _regmap_update_bits(map, reg, mask, val, NULL, true); - map->unlock(map->lock_arg); - - return ret; -} -EXPORT_SYMBOL_GPL(regmap_write_bits); - void regmap_async_complete_cb(struct regmap_async *async, int ret) { struct regmap *map = async->map; diff --git a/include/linux/regmap.h b/include/linux/regmap.h index e0960b3..5315ff0 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h @@ -721,8 +721,6 @@ int regmap_bulk_read(struct regmap *map, unsigned int reg, void *val, int regmap_update_bits_base(struct regmap *map, unsigned int reg, unsigned int mask, unsigned int val, bool *change, bool async, bool force); -int regmap_write_bits(struct regmap *map, unsigned int reg, - unsigned int mask, unsigned int val); int regmap_get_val_bytes(struct regmap *map); int regmap_get_max_register(struct regmap *map); int regmap_get_reg_stride(struct regmap *map); @@ -961,13 +959,6 @@ static inline int regmap_update_bits_base(struct regmap *map, unsigned int reg, return -EINVAL; } -static inline int regmap_write_bits(struct regmap *map, unsigned int reg, - unsigned int mask, unsigned int val) -{ - WARN_ONCE(1, "regmap API is disabled"); - return -EINVAL; -} - static inline int regmap_field_update_bits_base(struct regmap_field *field, unsigned int mask, unsigned int val, bool *change, bool async, bool force)