From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1edZpm-0001KQ-Oi for barebox@lists.infradead.org; Mon, 22 Jan 2018 11:00:20 +0000 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Mon, 22 Jan 2018 11:59:58 +0100 Message-Id: <20180122105958.15354-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH] i2c: read/write_reg: don't assume client->dev to be valid To: barebox@lists.infradead.org V2hlbiB1c2luZyB0aGUgYmFyZWJveCBjb21tYW5kcyBpMmNfcmVhZCBvciBpMmNfd3JpdGUgdGhl IGNsaWVudCBwb2ludGVyCnBhc3NlZCB0byB0aGUgcmVzcGVjdGl2ZSBmdW5jdGlvbiBpc24ndCBj b21wbGV0ZWx5IGluaXRpYWxpemVkLiBUaGlzCm1ha2VzCgoJZGV2X2RiZygmY2xpZW50LT5kZXYs IC4uLik7CgpjaG9rZSBhcyBpdCBkZXJlZmVyZW5jZXMgY2xpZW50LT5kZXYuZHJpdmVyLT5uYW1l IHdpdGgKY2xpZW50LT5kZXYuZHJpdmVyIGJlaW5nIGEgcmFuZG9tIHZhbHVlLgoKU2lnbmVkLW9m Zi1ieTogVXdlIEtsZWluZS1Lw7ZuaWcgPHUua2xlaW5lLWtvZW5pZ0BwZW5ndXRyb25peC5kZT4K LS0tCiBkcml2ZXJzL2kyYy9pMmMuYyB8IDQgKystLQogMSBmaWxlIGNoYW5nZWQsIDIgaW5zZXJ0 aW9ucygrKSwgMiBkZWxldGlvbnMoLSkKCmRpZmYgLS1naXQgYS9kcml2ZXJz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