From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755262AbdLTRSf (ORCPT ); Wed, 20 Dec 2017 12:18:35 -0500 Received: from mail-oi0-f66.google.com ([209.85.218.66]:34785 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754619AbdLTRSc (ORCPT ); Wed, 20 Dec 2017 12:18:32 -0500 X-Google-Smtp-Source: ACJfBot99O4qlnHod0igUmQn7BQLSLSG/gBN0l4LP1vpchwvlPt2zBY+IkvgM8H910BcYwkqjvaV9gj9ijD7W1A0BFQ= MIME-Version: 1.0 In-Reply-To: <1512768306-14816-3-git-send-email-svendev@arcx.com> References: <1512768306-14816-1-git-send-email-svendev@arcx.com> <1512768306-14816-3-git-send-email-svendev@arcx.com> From: Bartosz Golaszewski Date: Wed, 20 Dec 2017 18:18:31 +0100 Message-ID: Subject: Re: [PATCH v2 2/2] eeprom: at24: remove temporary fix for at24mac402 size. To: Sven Van Asbroeck Cc: Wolfram Sang , nsekhar@ti.com, Sakari Ailus , Javier Martinez Canillas , Divagar Mohandass , devicetree , Linux Kernel Mailing List , linux-i2c Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2017-12-08 22:25 GMT+01:00 Sven Van Asbroeck : > The chip size passed via devicetree, i2c, or acpi device ids is > now no longer limited to a power of two. So the temporary > fix can be removed. > > Signed-off-by: Sven Van Asbroeck > --- > drivers/misc/eeprom/at24.c | 10 ---------- > 1 file changed, 10 deletions(-) > > diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c > index c3759cb..e522350 100644 > --- a/drivers/misc/eeprom/at24.c > +++ b/drivers/misc/eeprom/at24.c > @@ -569,16 +569,6 @@ static int at24_probe(struct i2c_client *client, const struct i2c_device_id *id) > dev_warn(&client->dev, > "page_size looks suspicious (no power of 2)!\n"); > > - /* > - * REVISIT: the size of the EUI-48 byte array is 6 in at24mac402, while > - * the call to ilog2() in AT24_DEVICE_MAGIC() rounds it down to 4. > - * > - * Eventually we'll get rid of the magic values altoghether in favor of > - * real structs, but for now just manually set the right size. > - */ > - if (chip.flags & AT24_FLAG_MAC && chip.byte_len == 4) > - chip.byte_len = 6; > - > if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C) && > !i2c_check_functionality(client->adapter, > I2C_FUNC_SMBUS_WRITE_I2C_BLOCK)) > -- > 1.9.1 > Applied, thanks!