Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2116430imu; Wed, 21 Nov 2018 06:58:33 -0800 (PST) X-Google-Smtp-Source: AFSGD/UmGnlxzSZHKSaDcIJUB912RxJpDQSBW0ni3ZiWCad+3ApTjhyGPw7+HOx9IynkHGrEgbkp X-Received: by 2002:a63:ae01:: with SMTP id q1mr6188614pgf.402.1542812313208; Wed, 21 Nov 2018 06:58:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542812313; cv=none; d=google.com; s=arc-20160816; b=B1NTEpJ3O1FkR7s/Rnz8/xfd5zFuFxgebKQwD7Q7HmEELgGdq2I1/un9QCpxt13qvR JYvc3VAnjKUAI7syd55DKXgrVhc0ulZJoFmQ2FzZldAGpLbZogpALB1IwdHTqD71TugV 9itQRXFX8lcXDvI/8TLKvzc+tGGHswvnmg1MhGDqjv2Tu98wULxfv321axIlA8EZ/cOk 7eKoEA6gbcTjhYumTcaOfI5oXqIybr0Gki1/UVpVwVU3BoLeM4mdUMF+MF4NchNMEAcq QpOdg+2CBCYEbglKV9tkGUsp5nOjR6YODJNl5nb2yw1aEAiJJPnjsT5/nJpUjY/62+up cE6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=RujL8WsQvcB7xiRXcSS7PfIPsyH+7pFl/LY+KC0guMY=; b=rJajcn0y3GR7kFon3MXDX1gL+6HRDGwseVhBJ2+6YUtgAAjWFSDvEAmzS/rFUitPi+ XlI43WdE5OTUplLbO6NwMRsBkeC36YJ6apVACm0jTWcF58uXHxoLUP/MbVYzh6v0MNiO nTz6VTsMz2fh0ZhYZso9C1eDCRkXSkBVgevv6WntJiAvcqIp1wH7aPY7T0V0Pm5sr/mf 0GYliGDRUjV+SKq+E7jTZGSHDn9Op5PfBs6jufJKS57pjRoV9+IK6E2FA8+Qgz5toDGf b5xvn+WN7Rz37UlOitzl2i+VZM1HSRlGC61v9VlJI0tRFk+RRCirqh1gW0ssfhikN9XU b4fA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jxkuHlQv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z86si35220643pfl.209.2018.11.21.06.58.14; Wed, 21 Nov 2018 06:58:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jxkuHlQv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731395AbeKVBaB (ORCPT + 99 others); Wed, 21 Nov 2018 20:30:01 -0500 Received: from mail-ed1-f65.google.com ([209.85.208.65]:39349 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731307AbeKVB3p (ORCPT ); Wed, 21 Nov 2018 20:29:45 -0500 Received: by mail-ed1-f65.google.com with SMTP id b14so5115336edt.6 for ; Wed, 21 Nov 2018 06:55:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RujL8WsQvcB7xiRXcSS7PfIPsyH+7pFl/LY+KC0guMY=; b=jxkuHlQv7nOJkeB5rAviB8C3x0PlGP93g9Xhp1kuB1PDDQt4yfPE2Lsg4NalnY826m g352GurGcQrfpw6MxUyRsHkcY8N/X+OJg/d2pgneacClB2NHOPiwCo5aba0H8rqlmr5/ ls1anK+1vy55Q8HPjzeff8pSh/bTrQ4ow+w/z59i/RqMJ1aHcDO1qDDxL1jxMu4FPjrT JKGJS4bYKACpvERwqq57l8E0I9vBcLh+je2Pd3JjG1cDZXh3ZNhhi85xnnWFARlgn8Gs XuxP7LLe6iFKBoVeZOeAGAhxR/A1fc1FwdYEqisI+58gMAsDjFmY6AljA1W4HDHq19+M tmtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RujL8WsQvcB7xiRXcSS7PfIPsyH+7pFl/LY+KC0guMY=; b=UmJ0p7pv+8oSufzFQ6M/ByJgllAvqCt2My1it94LibUm/nRWpHfRirhJAH28T5u4V5 iTlvWa/h0cCsrtFsZ9Icyaakjey4pHxe7srDts9VBQyEBlaumz3pngN1KbZQkF9AAlC7 KaPCRlkdPLRg6EmwVVfkzWS9AOWJIkhgTdKTbm8jC4aYrO18NpCXCZtHLSu1rtvW+mlj A50Rhy0V42FVyTKstD8nrLCKK0nxIvz0DpVpOdDbCjXVRMDQVJP/SvykSJaZ6UdzoJq6 TIz7+Qv2P50OhH61OMvSmEMPukkybE6OBv7PiXkbav+c8zjgaZ5Uqf3zY9LigJcHnYc9 Ul2Q== X-Gm-Message-State: AA+aEWbrt58O9+o5PEcBzcJsYr2ParPH3RzkfUkxfZaPfd7wTeS3T7z3 iypC6uGUkBoVYkKW9wdXJwwp/Kd1 X-Received: by 2002:a50:9226:: with SMTP id i35mr6155769eda.8.1542812099631; Wed, 21 Nov 2018 06:54:59 -0800 (PST) Received: from localhost (pD9E511F8.dip0.t-ipconnect.de. [217.229.17.248]) by smtp.gmail.com with ESMTPSA id 49sm9467179edz.59.2018.11.21.06.54.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Nov 2018 06:54:59 -0800 (PST) From: Thierry Reding To: Jassi Brar Cc: linux-kernel@vger.kernel.org Subject: [PATCH 19/19] mailbox: ti-msgmgr: Use device-managed registration API Date: Wed, 21 Nov 2018 15:54:29 +0100 Message-Id: <20181121145429.7582-20-thierry.reding@gmail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181121145429.7582-1-thierry.reding@gmail.com> References: <20181121145429.7582-1-thierry.reding@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thierry Reding Get rid of some boilerplate driver removal code by using the newly added device-managed registration API. Signed-off-by: Thierry Reding --- drivers/mailbox/ti-msgmgr.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/mailbox/ti-msgmgr.c b/drivers/mailbox/ti-msgmgr.c index 713d701b6568..1be1f432d6a5 100644 --- a/drivers/mailbox/ti-msgmgr.c +++ b/drivers/mailbox/ti-msgmgr.c @@ -817,26 +817,15 @@ static int ti_msgmgr_probe(struct platform_device *pdev) mbox->of_xlate = ti_msgmgr_of_xlate; platform_set_drvdata(pdev, inst); - ret = mbox_controller_register(mbox); + ret = devm_mbox_controller_register(dev, mbox); if (ret) dev_err(dev, "Failed to register mbox_controller(%d)\n", ret); return ret; } -static int ti_msgmgr_remove(struct platform_device *pdev) -{ - struct ti_msgmgr_inst *inst; - - inst = platform_get_drvdata(pdev); - mbox_controller_unregister(&inst->mbox); - - return 0; -} - static struct platform_driver ti_msgmgr_driver = { .probe = ti_msgmgr_probe, - .remove = ti_msgmgr_remove, .driver = { .name = "ti-msgmgr", .of_match_table = of_match_ptr(ti_msgmgr_of_match), -- 2.19.1