Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1057251imu; Thu, 20 Dec 2018 09:23:43 -0800 (PST) X-Google-Smtp-Source: AFSGD/VxEGsjbl+us9PyD+So+r5niv+hd/WHvKFRbmm5AD4vU1jciBELVcaUVnIsN8HoXueJpUdh X-Received: by 2002:a62:68c5:: with SMTP id d188mr25999732pfc.194.1545326623662; Thu, 20 Dec 2018 09:23:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545326623; cv=none; d=google.com; s=arc-20160816; b=svZp4UZFi2feRUAKrSkyfZOghjuTrnkCkzvKP8Eg8NwdU4aVELPnc9tJ/zoZl61iKY /sMEcn420X07X+ZmBC0KtAbhtvackE+dMjsU6UjPtAam/vc83VATMmjxjmdJO8uNpiCv aPfZlM+lOTXSU2S8SENbOi8Jf6tLxCOQUMsU90uBxWX+pxCX9Nc7hJ20WJ481N+5+EQD 1w0WtdfHOwUquuelaRetI0TDRNlX6WMuT+n/h0DsLQFVocg4uj2mBVCqTezvhE7dFJp3 RGUkahnedqm7CCEj1vOLiOo3gQBpgBCh0d5EroVqv4NK+YBHfwpImINqugq7/GPf/VOY Tixw== 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=dJ3Thc+Tk49RI7tfOaoX7lNqDe2TvDSrwqm2GBO1DoE=; b=MmIOxpjarBVSOTKBL4Kl5QaGuaFAudxD4nGuBOaFNa4kZHdPYDvfFfuzDnBNP/fEhx ddrzR/AF4McvGkKvPkeC5E6BuX8sGCSEYLB8q4ZaI23ilMzZFyawCazPHxoj3jHgXWcj hZCC+Y5a0eWorG/fOAY6nwaRojLWIuHtM4nFBZ5Bhbnie7ENL4ZlYa7z+W9AEjaafYTr 66Kl1aI2ClLpX0rw42XYUGSGyqCGxRi4sryJ+3Wu38Cyax6w5pJF9tAOXGBI0EtWTUqw VquWtuwoPyPCg9lQpbzdmevPaaAmYt4AQoXyhCbbz3VblWDHAni1z+59GffNtiZtS2tc AQrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=oLZUR3ig; 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 u21si19177182pgg.463.2018.12.20.09.23.28; Thu, 20 Dec 2018 09:23:43 -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=oLZUR3ig; 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 S2387924AbeLTRUa (ORCPT + 99 others); Thu, 20 Dec 2018 12:20:30 -0500 Received: from mail-ed1-f68.google.com ([209.85.208.68]:43619 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387894AbeLTRU2 (ORCPT ); Thu, 20 Dec 2018 12:20:28 -0500 Received: by mail-ed1-f68.google.com with SMTP id f9so2379110eds.10 for ; Thu, 20 Dec 2018 09:20:27 -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=dJ3Thc+Tk49RI7tfOaoX7lNqDe2TvDSrwqm2GBO1DoE=; b=oLZUR3igaZA/j8Ua4saKR7f2Nx8U2k7STmLx4RdmnuFsk8f55SdRkR3ChE3jp9xx9q Qd+Je2gVL4CR5iPTEU+vCf5npWGTASxiJ8OC6U3WU5Gd0nHLhtitwSOJrTBw3C1nooJ9 2rFJfnE9f2cSqtACRjQexBGcC4CEB+bF1c3wmXPY0zP5nzo1OiiiCkNJzkz41f87IlX5 Jn+fnNpbIostHtZMLYmHYt/9DJtDLqh0ZO+drbATuXvEc1n6qGyDadaDNfye5B395DTU esG80CZ8jOpY/Gcm1x2lHgdq240UZ0eh/NSwyh0yo9fypEuNP0zaQj5sXYVbg8zKt3KC 5gBw== 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=dJ3Thc+Tk49RI7tfOaoX7lNqDe2TvDSrwqm2GBO1DoE=; b=TQjZE05FslaorHbBmU2Nwce9Yr8qkgbZ90CIdkj5vZ8Cq4g6eIR4ZDLWjdia38jAIG k5KsJMzzjpxbg6iIda2o74nivzc/YMyWOoOyU78Ijza00iNJRTZgC4LyPi50sx7aEtKk cstdcsGdrkmW8fgjCvcmZTErYj4vDlT/fwvmpdX5ma5EqpPS4d81EOZa+YDG68TW1yq5 3Luplz1ypHrkT6FKy0G/tT+eel3LoaI+j5ZFycD9Pp1l/6rB8HPntp7Hkt+KfstWBga3 JVWjqxsPeE+NcMe1RrSy/NfrP610HxOWNpd9Kb4e6BJcnMsQg6NUqAiyUD6/YtTbrcxN UAaw== X-Gm-Message-State: AA+aEWbiQJZTJazMdqV5KBfkUWe3Cetuhb5IxTFCD1gEZHKQmnE9rDgw 0ktKfdDDUYitGqaUhZBgDhY= X-Received: by 2002:a50:90b7:: with SMTP id c52mr24601934eda.31.1545326426393; Thu, 20 Dec 2018 09:20:26 -0800 (PST) Received: from localhost (pD9E51040.dip0.t-ipconnect.de. [217.229.16.64]) by smtp.gmail.com with ESMTPSA id s19-v6sm3321684ejz.2.2018.12.20.09.20.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Dec 2018 09:20:25 -0800 (PST) From: Thierry Reding To: Jassi Brar Cc: linux-kernel@vger.kernel.org, Tony Lindgren , Suman Anna Subject: [PATCH v3 14/19] mailbox: omap: Use device-managed registration API Date: Thu, 20 Dec 2018 18:19:57 +0100 Message-Id: <20181220172002.9016-15-thierry.reding@gmail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181220172002.9016-1-thierry.reding@gmail.com> References: <20181220172002.9016-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. Cc: Tony Lindgren Cc: Suman Anna Signed-off-by: Thierry Reding --- Changes in v2: - fix build failure reported by the kbuild test robot drivers/mailbox/omap-mailbox.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mailbox/omap-mailbox.c b/drivers/mailbox/omap-mailbox.c index db66e952a871..ca50177a33f2 100644 --- a/drivers/mailbox/omap-mailbox.c +++ b/drivers/mailbox/omap-mailbox.c @@ -486,7 +486,7 @@ static int omap_mbox_register(struct omap_mbox_device *mdev) list_add(&mdev->elem, &omap_mbox_devices); mutex_unlock(&omap_mbox_devices_lock); - ret = mbox_controller_register(&mdev->controller); + ret = devm_mbox_controller_register(mdev->dev, &mdev->controller); err_out: if (ret) { @@ -508,8 +508,6 @@ static int omap_mbox_unregister(struct omap_mbox_device *mdev) list_del(&mdev->elem); mutex_unlock(&omap_mbox_devices_lock); - mbox_controller_unregister(&mdev->controller); - mboxes = mdev->mboxes; for (i = 0; mboxes[i]; i++) device_unregister(mboxes[i]->dev); -- 2.19.1