|
@@ -674,8 +674,7 @@ int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz,
|
|
|
if (lower > upper || upper > max_state)
|
|
|
return -EINVAL;
|
|
|
|
|
|
- dev =
|
|
|
- kzalloc(sizeof(struct thermal_instance), GFP_KERNEL);
|
|
|
+ dev = kzalloc(sizeof(*dev), GFP_KERNEL);
|
|
|
if (!dev)
|
|
|
return -ENOMEM;
|
|
|
dev->tz = tz;
|
|
@@ -917,7 +916,7 @@ __thermal_cooling_device_register(struct device_node *np,
|
|
|
!ops->set_cur_state)
|
|
|
return ERR_PTR(-EINVAL);
|
|
|
|
|
|
- cdev = kzalloc(sizeof(struct thermal_cooling_device), GFP_KERNEL);
|
|
|
+ cdev = kzalloc(sizeof(*cdev), GFP_KERNEL);
|
|
|
if (!cdev)
|
|
|
return ERR_PTR(-ENOMEM);
|
|
|
|
|
@@ -1163,7 +1162,7 @@ thermal_zone_device_register(const char *type, int trips, int mask,
|
|
|
if (trips > 0 && (!ops->get_trip_type || !ops->get_trip_temp))
|
|
|
return ERR_PTR(-EINVAL);
|
|
|
|
|
|
- tz = kzalloc(sizeof(struct thermal_zone_device), GFP_KERNEL);
|
|
|
+ tz = kzalloc(sizeof(*tz), GFP_KERNEL);
|
|
|
if (!tz)
|
|
|
return ERR_PTR(-ENOMEM);
|
|
|
|