From patchwork Mon Nov 24 23:05:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 5370751 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C91EB9F39D for ; Mon, 24 Nov 2014 23:05:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0B0D520149 for ; Mon, 24 Nov 2014 23:05:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AFF9E20176 for ; Mon, 24 Nov 2014 23:05:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751988AbaKXXFz (ORCPT ); Mon, 24 Nov 2014 18:05:55 -0500 Received: from mail-wi0-f182.google.com ([209.85.212.182]:47778 "EHLO mail-wi0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751260AbaKXXFz (ORCPT ); Mon, 24 Nov 2014 18:05:55 -0500 Received: by mail-wi0-f182.google.com with SMTP id h11so7526307wiw.9 for ; Mon, 24 Nov 2014 15:05:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=x5pgJoPDQDf+p7cy9McIpqXlQCCKqi5o/ePB+kK3SzI=; b=h9UgUde5KolWMaa+eZLbd1fYRm1XHYtxNusRHo0hjFXIs3N7EyZTPMZ3FWXnwjdzeX eyS8eaQOPfc0K21EMpo4FwGtNe5AdmIBuuWY165/Ny4U9ZqwvRIGK2HtebC00/6/4kTI ul8CmPc+KQ9IHNGFqN3i4OD3QZeEw25sxHOFwaK5apR12Vcv4pT38QeSp5lj599HfD6X s+P4UZLfDQX1QbOIhRbX33ThA6X+5UtFeDX++J/Q/wxOwWrCJOIrYmYCvDci+U98gdlJ kXo4nXdNC0GRkbhhlx3M9LYKP1X6ZacxcOWpyMNDt2YyegMJ2rdrdhvQ63MXx0DYKpc8 PAog== X-Received: by 10.180.187.67 with SMTP id fq3mr25074378wic.37.1416870354082; Mon, 24 Nov 2014 15:05:54 -0800 (PST) Received: from fangorn.rup.mentorg.com (nat-min.mentorg.com. [139.181.32.34]) by mx.google.com with ESMTPSA id u5sm326051wiz.9.2014.11.24.15.05.52 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 24 Nov 2014 15:05:53 -0800 (PST) From: Dmitry Eremin-Solenikov To: Russell King , linux-arm-kernel@lists.infradead.org Cc: linux-pcmcia@lists.infradead.org, linux-fbdev@vger.kernel.org Subject: [PATCH V2 5/6] pcmcia: sa1111: provide device clock Date: Tue, 25 Nov 2014 02:05:35 +0300 Message-Id: <1416870336-30114-6-git-send-email-dbaryshkov@gmail.com> X-Mailer: git-send-email 2.1.3 In-Reply-To: <1416870336-30114-1-git-send-email-dbaryshkov@gmail.com> References: <1416870336-30114-1-git-send-email-dbaryshkov@gmail.com> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Both pxa2xx (long ago) and sa1100 (now) make use of clock device to get the cpu speed. Make sa1111 glue code provide clock to platform layer. Signed-off-by: Dmitry Eremin-Solenikov --- drivers/pcmcia/sa1111_generic.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/pcmcia/sa1111_generic.c b/drivers/pcmcia/sa1111_generic.c index 65b02c3..7bae7e5 100644 --- a/drivers/pcmcia/sa1111_generic.c +++ b/drivers/pcmcia/sa1111_generic.c @@ -145,6 +145,12 @@ int sa1111_pcmcia_add(struct sa1111_dev *dev, struct pcmcia_low_level *ops, return -ENOMEM; s->soc.nr = ops->first + i; + s->soc.clk = clk_get(&dev->dev, NULL); + if (IS_ERR(s->soc.clk)) { + ret = PTR_ERR(s->soc.clk); + kfree(s); + return ret; + } soc_pcmcia_init_one(&s->soc, ops, &dev->dev); s->dev = dev; if (s->soc.nr) { @@ -220,6 +226,7 @@ static int pcmcia_remove(struct sa1111_dev *dev) for (; s; s = next) { next = s->next; soc_pcmcia_remove_one(&s->soc); + clk_put(s->soc.clk); kfree(s); }