diff --git a/drivers/media/video/vp27smpx.c b/drivers/media/video/vp27smpx.c
index 577956c..f72b859 100644
--- a/drivers/media/video/vp27smpx.c
+++ b/drivers/media/video/vp27smpx.c
@@ -28,7 +28,7 @@
 #include <linux/i2c.h>
 #include <linux/i2c-id.h>
 #include <linux/videodev2.h>
-#include <media/v4l2-common.h>
+#include <media/v4l2-device.h>
 #include <media/v4l2-chip-ident.h>
 #include <media/v4l2-i2c-drv.h>
 
@@ -40,13 +40,20 @@
 /* ----------------------------------------------------------------------- */
 
 struct vp27smpx_state {
+	struct v4l2_subdev sd;
 	int radio;
 	u32 audmode;
 };
 
-static void vp27smpx_set_audmode(struct i2c_client *client, u32 audmode)
+static inline struct vp27smpx_state *to_state(struct v4l2_subdev *sd)
 {
-	struct vp27smpx_state *state = i2c_get_clientdata(client);
+	return container_of(sd, struct vp27smpx_state, sd);
+}
+
+static void vp27smpx_set_audmode(struct v4l2_subdev *sd, u32 audmode)
+{
+	struct vp27smpx_state *state = to_state(sd);
+	struct i2c_client *client = v4l2_get_subdevdata(sd);
 	u8 data[3] = { 0x00, 0x00, 0x04 };
 
 	switch (audmode) {
@@ -63,55 +70,89 @@
 	}
 
 	if (i2c_master_send(client, data, sizeof(data)) != sizeof(data))
-		v4l_err(client, "%s: I/O error setting audmode\n",
-				client->name);
+		v4l2_err(sd, "I/O error setting audmode\n");
 	else
 		state->audmode = audmode;
 }
 
-static int vp27smpx_command(struct i2c_client *client, unsigned cmd, void *arg)
+static int vp27smpx_s_radio(struct v4l2_subdev *sd)
 {
-	struct vp27smpx_state *state = i2c_get_clientdata(client);
-	struct v4l2_tuner *vt = arg;
+	struct vp27smpx_state *state = to_state(sd);
 
-	switch (cmd) {
-	case AUDC_SET_RADIO:
-		state->radio = 1;
-		break;
-
-	case VIDIOC_S_STD:
-		state->radio = 0;
-		break;
-
-	case VIDIOC_S_TUNER:
-		if (!state->radio)
-			vp27smpx_set_audmode(client, vt->audmode);
-		break;
-
-	case VIDIOC_G_TUNER:
-		if (state->radio)
-			break;
-		vt->audmode = state->audmode;
-		vt->capability = V4L2_TUNER_CAP_STEREO |
-			V4L2_TUNER_CAP_LANG1 | V4L2_TUNER_CAP_LANG2;
-		vt->rxsubchans = V4L2_TUNER_SUB_MONO;
-		break;
-
-	case VIDIOC_G_CHIP_IDENT:
-		return v4l2_chip_ident_i2c_client(client, arg,
-				V4L2_IDENT_VP27SMPX, 0);
-
-	case VIDIOC_LOG_STATUS:
-		v4l_info(client, "Audio Mode: %u%s\n", state->audmode,
-				state->radio ? " (Radio)" : "");
-		break;
-
-	default:
-		return -EINVAL;
-	}
+	state->radio = 1;
 	return 0;
 }
 
+static int vp27smpx_s_std(struct v4l2_subdev *sd, v4l2_std_id norm)
+{
+	struct vp27smpx_state *state = to_state(sd);
+
+	state->radio = 0;
+	return 0;
+}
+
+static int vp27smpx_s_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
+{
+	struct vp27smpx_state *state = to_state(sd);
+
+	if (!state->radio)
+		vp27smpx_set_audmode(sd, vt->audmode);
+	return 0;
+}
+
+static int vp27smpx_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
+{
+	struct vp27smpx_state *state = to_state(sd);
+
+	if (state->radio)
+		return 0;
+	vt->audmode = state->audmode;
+	vt->capability = V4L2_TUNER_CAP_STEREO |
+		V4L2_TUNER_CAP_LANG1 | V4L2_TUNER_CAP_LANG2;
+	vt->rxsubchans = V4L2_TUNER_SUB_MONO;
+	return 0;
+}
+
+static int vp27smpx_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_chip_ident *chip)
+{
+	struct i2c_client *client = v4l2_get_subdevdata(sd);
+
+	return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_VP27SMPX, 0);
+}
+
+static int vp27smpx_log_status(struct v4l2_subdev *sd)
+{
+	struct vp27smpx_state *state = to_state(sd);
+
+	v4l2_info(sd, "Audio Mode: %u%s\n", state->audmode,
+			state->radio ? " (Radio)" : "");
+	return 0;
+}
+
+static int vp27smpx_command(struct i2c_client *client, unsigned cmd, void *arg)
+{
+	return v4l2_subdev_command(i2c_get_clientdata(client), cmd, arg);
+}
+
+/* ----------------------------------------------------------------------- */
+
+static const struct v4l2_subdev_core_ops vp27smpx_core_ops = {
+	.log_status = vp27smpx_log_status,
+	.g_chip_ident = vp27smpx_g_chip_ident,
+};
+
+static const struct v4l2_subdev_tuner_ops vp27smpx_tuner_ops = {
+	.s_radio = vp27smpx_s_radio,
+	.s_std = vp27smpx_s_std,
+	.s_tuner = vp27smpx_s_tuner,
+	.g_tuner = vp27smpx_g_tuner,
+};
+
+static const struct v4l2_subdev_ops vp27smpx_ops = {
+	.core = &vp27smpx_core_ops,
+	.tuner = &vp27smpx_tuner_ops,
+};
+
 /* ----------------------------------------------------------------------- */
 
 /* i2c implementation */
@@ -125,6 +166,7 @@
 			  const struct i2c_device_id *id)
 {
 	struct vp27smpx_state *state;
+	struct v4l2_subdev *sd;
 
 	/* Check if the adapter supports the needed features */
 	if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA))
@@ -136,17 +178,21 @@
 	state = kzalloc(sizeof(struct vp27smpx_state), GFP_KERNEL);
 	if (state == NULL)
 		return -ENOMEM;
+	sd = &state->sd;
+	v4l2_i2c_subdev_init(sd, client, &vp27smpx_ops);
 	state->audmode = V4L2_TUNER_MODE_STEREO;
-	i2c_set_clientdata(client, state);
 
 	/* initialize vp27smpx */
-	vp27smpx_set_audmode(client, state->audmode);
+	vp27smpx_set_audmode(sd, state->audmode);
 	return 0;
 }
 
 static int vp27smpx_remove(struct i2c_client *client)
 {
-	kfree(i2c_get_clientdata(client));
+	struct v4l2_subdev *sd = i2c_get_clientdata(client);
+
+	v4l2_device_unregister_subdev(sd);
+	kfree(to_state(sd));
 	return 0;
 }
 
