/* It sets up a single environment variable DEV_TYPE which contains the hardware device type.  */
static int ap_uevent(struct device *dev, struct kobj_uevent_env *env)
/* It sets up a single environment variable DEV_TYPE which contains the hardware device type.  */
static int ap_uevent(struct device *dev, struct kobj_uevent_env *env)
{
	struct ap_device *ap_dev = to_ap_dev(dev);
	int retval = 0;
	if (!ap_dev)
		return -ENODEV;
	retval = add_uevent_var(env, "DEV_TYPE=%04X", ap_dev->device_type);
	if (retval)
		return retval;
	retval = add_uevent_var(env, "MODALIAS=ap:t%02X", ap_dev->device_type);
	return retval;
}