From patchwork Thu Dec 19 15:05:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 303569 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3E56C2C00D7 for ; Fri, 20 Dec 2013 02:06:34 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752961Ab3LSPGb (ORCPT ); Thu, 19 Dec 2013 10:06:31 -0500 Received: from mail-ea0-f179.google.com ([209.85.215.179]:38230 "EHLO mail-ea0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754493Ab3LSPFW (ORCPT ); Thu, 19 Dec 2013 10:05:22 -0500 Received: by mail-ea0-f179.google.com with SMTP id r15so545481ead.10 for ; Thu, 19 Dec 2013 07:05:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:in-reply-to:references:content-type; bh=WTC4UJU+PrbKDo/aA8Xw5qSrqgCgPLhvUZMz5CTvMSE=; b=H9m5Lk41FJvHp+r57ncqNfBLBVGcCtnEozARLkkPvBZ++abKZavXlVFTtVTL5ZJ6rv 8W1Ymg7EQxC1QjY8Q8pdUVYep9TzOaIRpVYhwy3KZrGzV2Q6z3MktWkwHB8nC+LkCmbA 1dode9RIrJuPJPrXhF8zbqKEOrM2b1B3yV+TQk70jgtWQigi0tjGF83Ijl+wmYLlB2af IgC3Hdjza2/Vu0ScpwvT4rPvNcQMCclbNfNaaPe8sBJAaDl70Phwq0mkP1wVzwu0RZrM KJ7JZwtI7du4N7E1H+TXLPK7raA5Xz8/bApVZW82czIQaAP32aqbY24d+4WJ+csAx9Ut eP0w== X-Gm-Message-State: ALoCoQnEqRKm1cKGGfCu4M2i8MAgrlXc3xuHgGAT+E3R7Bmv3qLt/4VBQZ1yql4pAG+Fxsbu4h5i X-Received: by 10.14.107.3 with SMTP id n3mr24032eeg.67.1387465521220; Thu, 19 Dec 2013 07:05:21 -0800 (PST) Received: from localhost (nat-63.starnet.cz. [178.255.168.63]) by mx.google.com with ESMTPSA id j46sm10065707eew.18.2013.12.19.07.05.19 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Thu, 19 Dec 2013 07:05:20 -0800 (PST) From: Michal Simek To: linux-kernel@vger.kernel.org, monstr@monstr.eu, wsa@the-dreams.de, joe@perches.com Cc: Jingoo Han , Jean Delvare , Peter Korsgaard , linux-i2c@vger.kernel.org Subject: [PATCH v5 2/3] i2c: xilinx: Do not enable irq before irq handler Date: Thu, 19 Dec 2013 16:05:05 +0100 Message-Id: X-Mailer: git-send-email 1.8.2.3 In-Reply-To: References: In-Reply-To: References: Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org IRQ handler has to be register first before IRQ is enabled in xiic_reinit(). Signed-off-by: Michal Simek --- Changes in v5: None Changes in v4: None Changes in v3: - New patch in this patchset based on my discussion with Wolfram https://lkml.org/lkml/2013/10/4/148 Changes in v2: None drivers/i2c/busses/i2c-xiic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 1.8.2.3 diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c index 5e5fae7..2d55989 100644 --- a/drivers/i2c/busses/i2c-xiic.c +++ b/drivers/i2c/busses/i2c-xiic.c @@ -731,8 +731,6 @@ static int xiic_i2c_probe(struct platform_device *pdev) i2c->adap.dev.parent = &pdev->dev; i2c->adap.dev.of_node = pdev->dev.of_node; - xiic_reinit(i2c); - spin_lock_init(&i2c->lock); init_waitqueue_head(&i2c->wait); ret = request_irq(irq, xiic_isr, 0, pdev->name, i2c); @@ -741,6 +739,8 @@ static int xiic_i2c_probe(struct platform_device *pdev) goto request_irq_failed; } + xiic_reinit(i2c); + /* add i2c adapter to i2c tree */ ret = i2c_add_adapter(&i2c->adap); if (ret) {