Search Linux Wireless

Re: [PATCH 02/43] iwlwifi: mvm: add registration to thermal zone

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2016-03-04 at 19:39 +0100, Bjørn Mork wrote:
> Emmanuel Grumbach <emmanuel.grumbach@xxxxxxxxx> writes:
> 
> > From: Chaya Rachel Ivgi <chaya.rachel.ivgi@xxxxxxxxx>
> > 
> > Register to thermal_zone interface and implement the
> > thermal ops.
> 
> And there it was :)

Yes, I guess you knew it was coming. :)


> > +static void iwl_mvm_thermal_zone_register(struct iwl_mvm *mvm)
> > +{
> > +	int i;
> > +	char name[] = "iwlwifi";
> > +
> > +	if (!iwl_mvm_is_tt_in_fw(mvm)) {
> > +		mvm->tz_device.tzone = NULL;
> > +
> > +		return;
> > +	}
> > +
> > +	BUILD_BUG_ON(ARRAY_SIZE(name) >= THERMAL_NAME_LENGTH);
> > +
> > +	mvm->tz_device.tzone = thermal_zone_device_register(name,
> 
> 
> Why not simply 
>         mvm->tz_device.tzone = thermal_zone_device_register(DRV_NAME,
> ?

Good point, I guess we could have used DRV_NAME instead of defining the
same string again.  The BUILD_BUG_ON() is just to be extra careful and
is probably a bit overkill now.  We have debated a lot about this name,
if it would have to be dynamic (i.e. different names for each device),
but then we settled on simply using the driver name.  Additionally, it
seems that most (if not all) other callers of this function pass their
own string instead of using DRV_NAME or whatever...

--
Cheers,
Luca.��.n��������+%������w��{.n�����{���zW����ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux