Return-path: Received: from mail-qw0-f46.google.com ([209.85.216.46]:38532 "EHLO mail-qw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750749Ab0G1Trn convert rfc822-to-8bit (ORCPT ); Wed, 28 Jul 2010 15:47:43 -0400 MIME-Version: 1.0 In-Reply-To: <1279733634-21974-4-git-send-email-ohad@wizery.com> References: <1279733634-21974-1-git-send-email-ohad@wizery.com> <1279733634-21974-4-git-send-email-ohad@wizery.com> Date: Wed, 28 Jul 2010 21:47:41 +0200 Message-ID: Subject: Re: [PATCH v2 03/20] mmc: support embedded data field in mmc_host From: Vitaly Wool To: Ohad Ben-Cohen Cc: linux-wireless@vger.kernel.org, linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org, Kalle Valo , Pandita Vikram , linux@arm.linux.org.uk, Nicolas Pitre , Tony Lindgren , Roger Quadros , San Mehat , Chikkature Rajashekar Madhusudhan , Luciano Coelho , akpm@linux-foundation.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-wireless-owner@vger.kernel.org List-ID: Hi Ohad, On Wed, Jul 21, 2010 at 7:33 PM, Ohad Ben-Cohen wrote: > Add support to set/get mmc_host private embedded > data. > > This is needed to allow software to dynamically > create (and remove) SDIO functions which represents > embedded SDIO devices. > > @@ -209,6 +209,8 @@ struct mmc_host { > ? ? ? ?struct led_trigger ? ? ?*led; ? ? ? ? ? /* activity led */ > ?#endif > > + ? ? ? void ? ? ? ? ? ? ? ? ? ?*embedded_data; > + To my understanding, this data doesn't belong to mmc_host. It's not a host data at all. E. g. imagine a GPIO IRQ for some SDIO chip -- it's totally unrelated to host. I think a cleaner way would be to introduce something similar to what we have for SPI, e. g. struct sdio_board_info. This board info will contain platform-specific stuff and vendor id/chip id for each onboard SDIO device. Then the SDIO core will pick up the appropriate data basing on vendor id/chip id. ~Vitaly