From patchwork Tue Sep 10 12:49:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 19888 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f197.google.com (mail-ob0-f197.google.com [209.85.214.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EEEC525E85 for ; Tue, 10 Sep 2013 12:50:24 +0000 (UTC) Received: by mail-ob0-f197.google.com with SMTP id eh20sf27365700obb.4 for ; Tue, 10 Sep 2013 05:50:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=OeGG+pHVlbKb0cMCw3Y7S26+5vBHG42o15c9qesZP24=; b=Vue4cHj8P2comsog/CCAdbRawi57NdpAzyT57ZhSZR/bMrpEY6VoDoVBKNXpP5juOj UtQf0vTKfuEIS3Fh7awruqzEaFwsUOI5iCCZMG/Wv+CgxEbRqeldNPPEO3WxJpXBwWqS lVJsh8OHwBwCxM0NdDyEGQrST14szXAH2DEMNi/4EsuBhekL3ZJaEGzNcL7w05hisO4Y lTdAf5xEHZj04RWiwA8iFMxMCOSisqNpNXF2Dnw7x2Zi8+zMKAI/BGIq8LH4RFV76phE dMNLB0TMnyz7JT1psm9jBtbjZGQrW6Tai68TRu2jfNhjjBC5PUBDc1wRQHUpnUy/+nvw r1zQ== X-Received: by 10.182.66.193 with SMTP id h1mr53014obt.47.1378817424466; Tue, 10 Sep 2013 05:50:24 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.16.6 with SMTP id b6ls781554qed.79.gmail; Tue, 10 Sep 2013 05:50:24 -0700 (PDT) X-Received: by 10.220.164.202 with SMTP id f10mr1133560vcy.25.1378817424010; Tue, 10 Sep 2013 05:50:24 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id o5si4389232vdw.76.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Sep 2013 05:50:24 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id kw10so4992063vcb.15 for ; Tue, 10 Sep 2013 05:50:23 -0700 (PDT) X-Gm-Message-State: ALoCoQkk7lkR4qcn7WpBJW9edkNbVIVTrboMS6B6EcUtXlCW9FRuGlh0da6eX7aW3VRZQSUVvM1b X-Received: by 10.58.133.66 with SMTP id pa2mr10945813veb.18.1378817423923; Tue, 10 Sep 2013 05:50:23 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp19416vcz; Tue, 10 Sep 2013 05:50:23 -0700 (PDT) X-Received: by 10.14.3.9 with SMTP id 9mr2682273eeg.72.1378817420251; Tue, 10 Sep 2013 05:50:20 -0700 (PDT) Received: from mail-ea0-f181.google.com (mail-ea0-f181.google.com [209.85.215.181]) by mx.google.com with ESMTPS id x42si14854114eea.104.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Sep 2013 05:50:20 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.215.181 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=209.85.215.181; Received: by mail-ea0-f181.google.com with SMTP id d10so3903179eaj.12 for ; Tue, 10 Sep 2013 05:50:19 -0700 (PDT) X-Received: by 10.15.75.73 with SMTP id k49mr38545173eey.36.1378817419612; Tue, 10 Sep 2013 05:50:19 -0700 (PDT) Received: from localhost.localdomain (cpc15-aztw25-2-0-cust493.aztw.cable.virginmedia.com. [92.233.57.238]) by mx.google.com with ESMTPSA id z12sm31123277eev.6.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Sep 2013 05:50:19 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, jic23@cam.ac.uk Cc: arnd@arndb.de, linus.walleij@linaro.org, denis.ciocca@st.com, linux-iio@vger.kernel.org, Lee Jones Subject: [PATCH 33/38] iio: accel-core: st: Give some indication if device probing was successful Date: Tue, 10 Sep 2013 13:49:34 +0100 Message-Id: <1378817379-8238-34-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1378817379-8238-1-git-send-email-lee.jones@linaro.org> References: <1378817379-8238-1-git-send-email-lee.jones@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , At the moment the driver is silent in some error cases and if successful. Prior to this patch there was no clear way to know if the driver succeeded or not without looking deep into sysfs. Signed-off-by: Lee Jones --- drivers/iio/accel/st_accel_core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/iio/accel/st_accel_core.c b/drivers/iio/accel/st_accel_core.c index 03a2b6b..a003f3b 100644 --- a/drivers/iio/accel/st_accel_core.c +++ b/drivers/iio/accel/st_accel_core.c @@ -496,6 +496,9 @@ int st_accel_common_probe(struct iio_dev *indio_dev, if (err && irq > 0) goto st_accel_device_register_error; + if (!err) + dev_info(&indio_dev->dev, "Successfully registered\n"); + return err; st_accel_device_register_error: